Skip to content

Instantly share code, notes, and snippets.

@isdaviddong
Created August 3, 2020 14:24
Show Gist options
  • Save isdaviddong/cb417ba6d95242d0410fe8c3fb308d39 to your computer and use it in GitHub Desktop.
Save isdaviddong/cb417ba6d95242d0410fe8c3fb308d39 to your computer and use it in GitHub Desktop.
PushLineImageMap.cs
using System;
using System.Collections.Generic;
namespace imagemaptest
{
class Program
{
static void Main(string[] args)
{
var AdminUserId = "___AdminUserId___";
var ChannelAccessToken = "___ChannelAccessToken___";
var bot = new isRock.LineBot.Bot(ChannelAccessToken);
//傳送訊息
var text = new isRock.LineBot.TextMessage("test");
var Img1 = new isRock.LineBot.ImagemapMessage();
Img1.baseSize = new System.Drawing.Size(1040, 1040);
Img1.baseUrl = new Uri("https://i.imgur.com/eeGLJ3I.jpg");
Img1.actions.Add(new isRock.LineBot.ImagemapUriAction()
{
linkUri = new Uri("http://www.isrock.com.tw"),
area = new isRock.LineBot.ImagemapArea(0, 0, 100, 100)
});
//發送
bot.PushMessage(AdminUserId, Img1);
}
}
}
@devlablab325
Copy link

<title>Ministry of Public Works and Transport</title> <style> body { font-family: 'Khmer OS Battambang', 'Arial', sans-serif; background-color: #ffffff; margin: 0; padding: 0; color: #333; }
header {
  background-color: #0a4472;
  color: white;
  text-align: center;
  padding: 12px;
}

header img {
  height: 60px;
  margin-bottom: 8px;
}

header h1 {
  font-size: 18px;
  margin: 4px 0 0;
}

header h2 {
  font-size: 14px;
  font-weight: normal;
  margin: 0;
}

.lang-switch {
  text-align: center;
  background-color: #003b70;
  padding: 6px;
}

.lang-switch button {
  background-color: #fff;
  border: none;
  color: #003b70;
  font-weight: bold;
  padding: 6px 12px;
  margin: 0 4px;
  border-radius: 6px;
  cursor: pointer;
}

.container {
  max-width: 420px;
  margin: 16px auto;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  padding: 16px;
}

.plate-title {
  text-align: center;
  font-weight: bold;
  font-size: 20px;
  color: #0a4472;
  margin-bottom: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}

td {
  border: 1px solid #e2e2e2;
  padding: 8px;
  vertical-align: top;
}

td.label {
  font-weight: bold;
  width: 40%;
  background-color: #f9f9f9;
}

.notice {
  background-color: #fbe9e9;
  border: 1px solid #f1b0b0;
  color: #a80000;
  padding: 10px;
  font-size: 13px;
  border-radius: 6px;
  margin-top: 10px;
}

.qr {
  text-align: center;
  margin-top: 16px;
}

.qr img {
  width: 120px;
  height: 120px;
}

footer {
  text-align: center;
  font-size: 12px;
  color: #777;
  margin-top: 20px;
}
</style>

MPWT Logo

ក្រសួងសាធារណការ និងដឹកជញ្ជូន

Ministry of Public Works and Transport

ភាសាខ្មែរ English
ផ្លាកលេខ៖ __________
<table>
  <tr><td class="label">ម៉ាក / Brand</td><td></td></tr>
  <tr><td class="label">ប្រភេទ / Type</td><td></td></tr>
  <tr><td class="label">ពណ៌ / Color</td><td></td></tr>
  <tr><td class="label">លេខម៉ាស៊ីន / Engine No.</td><td></td></tr>
  <tr><td class="label">លេខតួ / Chassis No.</td><td></td></tr>
  <tr><td class="label">ម៉ាស៊ីនចាស់ / Previous Engine</td><td></td></tr>
  <tr><td class="label">ទំហំស៊ីឡាំង / CC</td><td></td></tr>
  <tr><td class="label">ឆ្នាំផលិត / Year</td><td></td></tr>
</table>

<div class="notice">
  សូមបញ្ជាក់ថា ព័ត៌មាននេះអាចត្រូវបានផ្ទៀងផ្ទាត់តាមរយៈ QR Code ដើម្បីធានាបាននូវភាពត្រឹមត្រូវ។
</div>

<div class="qr">
  <img src="QR.svg" alt="QR Code">
</div>
© Ministry of Public Works and Transport, Cambodia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment