Esempio n. 1
0
 private void CloseEvent(object sender, CustomButtonEventArgs e)
 {
     if (Response != null)
     {
         Response(this, new CustomButtonEventArgs("Close", NotifyType, NotifyScript));
     }
 }
Esempio n. 2
0
        private void item_Response(object sender, CustomButtonEventArgs e)
        {
            if (e.ActionType == "Action")
            {
                switch (e.Main)
                {
                case "Url":
                    BallonTouch(e.Detail);
                    break;

                case "Local":
                    string path = Path.Combine(
                        Environment.GetFolderPath(Environment.SpecialFolder.Desktop),
                        e.Detail);

                    if (File.Exists(path))
                    {
                        string argument = String.Format("/select, \"{0}\"", path);
                        Task.Factory.StartNew(() => Process.Start("explorer.exe", argument));
                    }

                    break;
                }
            }

            DeleteAlert(sender as NotiItem);
            //MessageBox.Show(String.Format("{0} {1} {2}", e.ActionType, e.Main, e.Detail));
        }
Esempio n. 3
0
        private void ImageButton_Response(object sender, CustomButtonEventArgs e)
        {
            switch (e.Main)
            {
            case "close":
                HideOption();
                break;

            case "save":
                Setting.Server = textboxServer.Text;
                Setting.Token  = textboxToken.Text;

                if (checkJPG.IsChecked == true)
                {
                    Setting.SaveMethod = "JPG";
                }
                else
                {
                    Setting.SaveMethod = "PNG";
                }

                Setting.Save();
                buttonSave.ViewMode = ImageButton.Mode.Hidden;
                break;

            case "vercheck":
                UpdateCheck();
                break;

            case "update":
                UpdateDownload();
                break;

            default:
                MessageBox.Show(e.Main);
                break;
            }
        }