Example #1
0
 // Token: 0x060002EC RID: 748 RVA: 0x000146E0 File Offset: 0x000128E0
 private void Prepare_ScrapMenu()
 {
     listScrapMenuItems.Items.Clear();
     foreach (var item in CPreStyles.GetPreStyleList())
     {
         listScrapMenuItems.Items.Add(item);
     }
     RefreshScrapMenuList_Menu(_so.Scrap.SubMenuStyles);
 }
Example #2
0
 private void OptionApply()
 {
     try
     {
         this.UpdateTopMostTimer();
         this.keyBook = this.optSetuna.GetKeyItemBook();
         if (this.optSetuna.Setuna.DustBoxEnable)
         {
             this.scrapBook.DustBoxCapacity = (short)this.optSetuna.Setuna.DustBoxCapacity;
         }
         else
         {
             this.scrapBook.DustBoxCapacity = 0;
         }
         if (!this.optSetuna.RegistHotKey(base.Handle))
         {
             this.optSetuna.ScrapHotKeyEnable = false;
             new HotkeyMsg {
                 HotKey = (Keys)this.optSetuna.ScrapHotKey
             }.ShowDialog();
         }
         if (this.optSetuna.Setuna.AppType == SetunaOption.SetunaOptionData.ApplicationType.ApplicationMode)
         {
             base.ShowInTaskbar      = true;
             this.setunaIcon.Visible = false;
             base.MinimizeBox        = true;
             base.Visible            = true;
         }
         else
         {
             this.setunaIcon.Visible = true;
             base.ShowInTaskbar      = false;
             base.MinimizeBox        = false;
             base.WindowState        = FormWindowState.Normal;
             base.Visible            = this.optSetuna.Setuna.ShowMainWindow;
         }
         this.subMenu.Items.Clear();
         foreach (int num in this.optSetuna.Scrap.SubMenuStyles)
         {
             if (num >= 0)
             {
                 foreach (CStyle style in this.optSetuna.Styles)
                 {
                     if (style.StyleID == num)
                     {
                         this.subMenu.Items.Add(style.GetToolStrip(this.scrapBook));
                     }
                 }
             }
             else
             {
                 CStyle preStyle = CPreStyles.GetPreStyle(num);
                 if (preStyle != null)
                 {
                     this.subMenu.Items.Add(preStyle.GetToolStrip(this.scrapBook));
                 }
             }
         }
         if (this.optSetuna.Setuna.ClickCapture)
         {
             if (this.frmClickCapture == null)
             {
                 this.frmClickCapture = new ClickCapture(this.optSetuna.Setuna.ClickCaptureValue);
                 this.frmClickCapture.ClickCaptureEvent += new ClickCapture.ClipCaptureDelegate(this.frmClickCapture_ClickCaptureEvent);
                 this.frmClickCapture.Show();
             }
             else
             {
                 this.frmClickCapture.ClickFlags = this.optSetuna.Setuna.ClickCaptureValue;
                 this.frmClickCapture.Restart();
             }
         }
         else if (this.frmClickCapture != null)
         {
             this.frmClickCapture.Close();
             this.frmClickCapture.Dispose();
             this.frmClickCapture = null;
         }
     }
     catch (Exception exception)
     {
         Console.WriteLine("Mainform OptionApply Exception:" + exception.Message);
     }
 }