예제 #1
0
 private void Add_Click(string Name)
 {
     try
     {
         char[] trimChars = new char[] { ',' };
         this.type = this.type.TrimEnd(trimChars);
         MESSAGE message = new MESSAGE();
         if (string.IsNullOrEmpty(this.type))
         {
             OpenWindows.Prompt(message.FeedbackTypeIsNull);
         }
         else if (string.IsNullOrEmpty(this.Description.Text))
         {
             OpenWindows.Prompt(message.DescriptionNotNull);
         }
         else
         {
             this.model.Type        = this.type;
             this.model.Description = this.Description.Text;
             if (UserActionUtils.WriteFeedback(this.model))
             {
                 base.Close();
             }
         }
     }
     catch
     {
     }
 }
예제 #2
0
 public void SetBackGroud()
 {
     try
     {
         if (this.BackGround.Contains("."))
         {
             if (!this.BackGround.Contains("pack://application:,,,"))
             {
                 this.BackGround = string.Format("pack://application:,,,{0}", this.BackGround);
             }
             ImageBrush brush1 = new ImageBrush
             {
                 ImageSource = new BitmapImage(new Uri(this.BackGround))
             };
             base.Background = brush1;
         }
         else
         {
             base.Background = new BrushConverter().ConvertFromInvariantString(this.BackGround) as Brush;
         }
     }
     catch (Exception ex)
     {
         OpenWindows.Prompt(ex.CreateErrorMsg());
     }
 }
예제 #3
0
        private void _Click(string Name)
        {
            string text = this.Time.Text;

            if (!string.IsNullOrEmpty(text) && ConfigerHelper.SetAppSettingsConfig(new ConfigerParameterName().HistorySaveDays, text))
            {
                OpenWindows.Prompt("设定成功");
                base.Close();
            }
        }
예제 #4
0
 private void Collection_Click(string Name)
 {
     if (string.IsNullOrEmpty(this.users.UserId))
     {
         OpenWindows.Prompt(new MESSAGE().NotLogin);
     }
     else
     {
         UserActionUtils.WriteCollection(this.users.UserId, this.model);
     }
 }
예제 #5
0
        private void Delete_Click(object sender, RoutedEventArgs e)
        {
            BACAClient.Model.Collection model = new BACAClient.Model.Collection
            {
                UserID = this.UserId,
                LngId  = this.model.LngId,
                TypeID = this.model.TypeId
            };
            MESSAGE message = new MESSAGE();

            OpenWindows.Prompt(message.RemoveSuccess);
            this.Refresh();
        }
예제 #6
0
        private void Icon_Click(string Name)
        {
            try
            {
                this.CloseWindows();
                string str = Name.ToLower();
                if (!(str == "close"))
                {
                    if (str == "max")
                    {
                        goto Label_004E;
                    }
                    if (str == "min")
                    {
                        goto Label_0057;
                    }
                    if (str == "menubutton")
                    {
                        goto Label_0060;
                    }
                }
                else
                {
                    ApplicationInfo.CloseApplication();
                }
                return;

Label_004E:
                this.LayOut();
                return;

Label_0057:
                this.HideOrShow();
                return;

Label_0060:
                if (this.Menu.IsOpen)
                {
                    this.Menu.IsOpen = false;
                }
                else
                {
                    this.Menu.IsOpen = true;
                }
            }
            catch (Exception ex)
            {
                OpenWindows.Prompt(ex.CreateErrorMsg());
            }
        }
예제 #7
0
        private void DeleteAll_Click(string Name)
        {
            TypeInitialization initialization = new TypeInitialization();

            BACAClient.Model.Collection model = new BACAClient.Model.Collection
            {
                UserID = this.model.UserId,
                TypeID = initialization.INT,
                LngId  = initialization.INT
            };
            MESSAGE message = new MESSAGE();

            OpenWindows.Prompt(message.RemoveSuccess);
        }
예제 #8
0
        private void DeleteOne_Click(string Name)
        {
            this.IsOpen = false;
            MESSAGE message = new MESSAGE();
            string  data    = string.Empty;

            //if (new LocalHistoryUtils().RemoveChildNodes(this.model))
            //{
            //    data = message.RemoveSuccess;
            //    this.gotokdp(null, this.Index);
            //}
            //else
            //{
            //    data = message.RemoveError;
            //}
            OpenWindows.Prompt(data);
        }