Ejemplo n.º 1
0
        private void iconText_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            OpenFileDialog opFileDialog = new OpenFileDialog();

            opFileDialog.Filter = "支持的图标格式|*.ico;*.png;*.jpg";
            opFileDialog.Title  = "选择一个支持的图像文件作为自定义图标";
            string exIcon = myZiku.exPand(myZiku.variableToSave(iconBox.text, ZIKU.DataBase.Config.Instance.Path), ZIKU.DataBase.Config.Instance.Path);

            if (System.IO.File.Exists(exIcon) && iconBox.text != "")
            {
                System.IO.FileInfo ff = new System.IO.FileInfo(exIcon);
                opFileDialog.InitialDirectory = ff.Directory.FullName;
            }

            if (opFileDialog.ShowDialog() == DialogResult.OK)
            {
                iconBox.text = opFileDialog.FileName;
                Tip.SetToolTip(ItemIconBox, "自定义图标:" + opFileDialog.FileName);
                ItemIconBox.Image = myZiku.IconOrFile(iconBox.text, myZiku.exPand(myZiku.variableToSave(valueBox.text, ZIKU.DataBase.Config.Instance.Path), ZIKU.DataBase.Config.Instance.Path), null);
                if (idORnull != null)
                {
                    System.IO.File.Delete(ZIKU.DataBase.Config.Instance.Path + ".cache\\icon\\" + idORnull + ".png");
                }
            }
        }
Ejemplo n.º 2
0
 private void UpdateToolTipDefault(int index, bool updateStats)
 {
     if (!updateStats || !RecordList.TryGetValue(index, out var tip))
     {
         Tip.RemoveAll();
         return;
     }
     Tip.SetToolTip(CB_Stats, tip);
 }
Ejemplo n.º 3
0
        // Login completed.
        private void backgroundWorker2_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            this.panel2.Enabled = true;
            this.UseWaitCursor  = false;
            this.button1.Text   = "登入";
            if (e.Error != null)
            {
                errexit(e.Error.Message, 1);
                return;
            }
            if ((string)e.Result != null)
            {
                errexit((string)e.Result, 1);
                return;
            }

            try
            {
                listView1.Items.Clear();
                foreach (var account in this.bfClient.accountList)
                {
                    string[] row          = { WebUtility.HtmlDecode(account.sname), account.sacc };
                    var      listViewItem = new ListViewItem(row);
                    this.listView1.Items.Add(listViewItem);
                }

                // Handle panel switching.
                this.ActiveControl = null;
                this.panel2.SendToBack();
                this.panel1.BringToFront();
                this.AcceptButton = this.button3;
                this.listView1.Items[Properties.Settings.Default.autoSelectIndex].Selected = true;
                this.listView1.Select();
                if (Properties.Settings.Default.autoSelect == true && Properties.Settings.Default.autoSelectIndex < this.bfClient.accountList.Count())
                {
                    this.textBox3.Text     = "獲取密碼中...";
                    this.listView1.Enabled = false;
                    this.backgroundWorker1.RunWorkerAsync(Properties.Settings.Default.autoSelectIndex);
                }
                if (Properties.Settings.Default.keepLogged && !this.ping.IsBusy)
                {
                    this.ping.RunWorkerAsync();
                }
                ShowToolTip(listView1, "步驟1", "選擇欲開啟的遊戲帳號,雙擊以複製帳號。");
                ShowToolTip(button3, "步驟2", "按下以在右側產生並自動複製密碼,至遊戲中貼上帳密登入。");
                Tip.SetToolTip(button3, "點擊獲取密碼");
                Tip.SetToolTip(listView1, "雙擊即自動複製");
                Tip.SetToolTip(textBox3, "點擊一次即自動複製");
                Properties.Settings.Default.showTip = false;
                Properties.Settings.Default.Save();
            }
            catch
            {
                errexit("登入失敗,無法取得帳號列表。", 1);
            }
        }
Ejemplo n.º 4
0
        private void UpdateToolTipSpecial(int index, bool updateStats)
        {
            var str = GetToolTipText?.Invoke(index);

            if (str != null)
            {
                Tip.SetToolTip(NUD_Stat, str);
                return;
            }
            UpdateToolTipDefault(index, updateStats); // fallback
        }
Ejemplo n.º 5
0
        public void MetaData_AfterLink()
        {
            HelpForm.SetAllowMultiSelection(DS.assetpieceview, true);
            Meta = MetaData.GetMetaData(this);
            Conn = Meta.Conn;
            QHS  = Conn.GetQueryHelper();
            QHC  = new CQueryHelper();
            string filter = QHS.CmpEq("ayear", Conn.GetSys("esercizio"));

            GetData.CacheTable(DS.config, filter, null, false);
            GetData.CacheTable(DS.incomephase, null, "nphase", true);
            Mentrataview = MetaData.GetMetaData(this, "incomeview");

            //Tooltip
            Tip.SetToolTip(btnInizia, "Cliccare qui per far partire la generazione automatica");
            Tip.SetToolTip(grpIncludi, "Selezionare una delle voci per filtrare la generazione completa");
            Tip.SetToolTip(rdoAll, "Selezionare questa voce se si vogliono tutti i tipi di scarico");
            Tip.SetToolTip(rdoBene, "Selezionare questa voce se si vuole scaricare solo i cespiti");
            Tip.SetToolTip(rdoParte, "Selezionare questa voce se si vuole scaricare solo gli aumenti di valore");
            Tip.SetToolTip(btnGeneraTutto, "Cliccare qui per avviare in qualsiasi momento la generazione automatica");
            //Tip.SetToolTip(btnAddAll,"Cliccare qui per collegare al buono sia gli scarichi cespiti che gli scarichi parti");
            Tip.SetToolTip(btnAddBene, "Cliccare qui per scaricare i cespiti e gli eumenti di valore selezionati");
            Tip.SetToolTip(btnSuccessivo, "Cliccare qui per passare al buono successivo");
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 初始化,并显示窗口
        /// </summary>
        /// <param name="filePath"></param>
        /// <param name="Dialog">是否采用模式窗口</param>
        private void initAndShow(string filePath = null, bool Dialog = true)
        {
            if (idORnull != null)
            {
                ZIKU.DataBase.Item item = ZIKU.DataBase.Item.getInstance(idORnull);
                nameBox.Text      = item.name;
                valueBox.text     = item.valueShow;
                argumentsBox.text = item.argumentsShow;
                versionBox.Text   = item.version;
                introBox.Text     = item.intro;
                introduceBox.Text = item.introduce;
                // buff_icon = item.icon;
                item_Hide_main.Checked   = item.isHideMain;
                item_Hide_search.Checked = item.isHideSearch;
                iPath_BOX.text           = item.iPathShow;
                searchAliasBox.Text      = item.searchAlias;
                workingdirBox.text       = item.workingDirectoryShow;
                homePageBox.Text         = item.homePage;
                onAdminBox.Checked       = item.onAdmin;
                iv_x64_BOX.text          = item.IV_x64Show;
                iv_x86_BOX.text          = item.IV_x86Show;
                oleUID      = item.UID.ToUpper();
                UIDBox.Text = item.UID;

                ItemIconBox.Image = myZiku.IconOrFile(item.icon, item.valueExpand, idORnull);
                iconBox.text      = item.iconShow;
                refreshCategoryListBox(item.C_ID);

                okButton.Text = "保存";
                Text          = "编辑项目:当前项目的UID是:" + item.UID;
                Tip.SetToolTip(value_Text, "%i-" + item.UID + "%");
                Tip.SetToolTip(x86Value_Text, "%i32-" + item.UID + "%");
                Tip.SetToolTip(x64Value_Text, "%i64-" + item.UID + "%");
                Tip.SetToolTip(arguments_Text, "%ia-" + item.UID + "%");
                Tip.SetToolTip(iPath_Text, "%ip-" + item.UID + "%\r\n%id-" + item.UID + "%");
                Tip.SetToolTip(workingDir_Text, "%iw-" + item.UID + "%");
            }
            else
            {
                Text        = "新建项目";
                UIDBox.Text = "";
                if (filePath != null)
                {
                    //设置项目信息
                    FileInfoBox.ItemFileInfo re = new FileInfoBox.ItemFileInfo(filePath);
                    nameBox.Text       = re.name;
                    versionBox.Text    = re.version;
                    valueBox.text      = re.value;
                    argumentsBox.text  = re.arguments;
                    workingdirBox.text = re.workdir;
                    introBox.Text      = re.induce;
                    iconBox.text       = re.icon;

                    ItemIconBox.Image = myZiku.IconOrFile(re.icon, myZiku.exPand(re.value, ZIKU.DataBase.Config.Instance.Path), null);
                }
                refreshCategoryListBox(MainForm.Instance.category_Main.id);
            }
            Tools.SetForegroundWindow(this.Handle);
            if (Dialog)
            {
                this.ShowDialog();//这里不要用 ShowDialog ,模式窗口会导致拖拽进入的窗口冻结
            }
            else
            {
                this.Show();
            }
        }
Ejemplo n.º 7
0
        // Login completed.
        private void loginWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            if (Properties.Settings.Default.GAEnabled && this.timedActivity != null)
            {
                AutoMeasurement.Client.Track(this.timedActivity);
                this.timedActivity = null;
            }
            if (Properties.Settings.Default.keepLogged && !this.pingWorker.IsBusy)
            {
                this.pingWorker.RunWorkerAsync();
            }
            Debug.WriteLine("loginWorker end");
            this.panel2.Enabled   = true;
            this.UseWaitCursor    = false;
            this.loginButton.Text = "登入";
            if (e.Error != null)
            {
                errexit(e.Error.Message, 1);
                return;
            }
            if ((string)e.Result != null)
            {
                errexit((string)e.Result, 1);
                return;
            }

            try
            {
                listView1.Items.Clear();
                foreach (var account in this.bfClient.accountList)
                {
                    string[] row          = { WebUtility.HtmlDecode(account.sname), account.sacc };
                    var      listViewItem = new ListViewItem(row);
                    this.listView1.Items.Add(listViewItem);
                }

                // Handle panel switching.
                this.ActiveControl = null;
                this.Size          = new System.Drawing.Size(300, 290);
                this.panel2.SendToBack();
                this.panel1.BringToFront();
                this.AcceptButton = this.getOtpButton;
                if (Properties.Settings.Default.autoSelectIndex < this.listView1.Items.Count)
                {
                    this.listView1.Items[Properties.Settings.Default.autoSelectIndex].Selected = true;
                }
                this.listView1.Select();
                if (Properties.Settings.Default.autoSelect == true && Properties.Settings.Default.autoSelectIndex < this.bfClient.accountList.Count())
                {
                    if (this.pingWorker.IsBusy)
                    {
                        this.pingWorker.CancelAsync();
                    }
                    this.textBox3.Text        = "獲取密碼中...";
                    this.listView1.Enabled    = false;
                    this.getOtpButton.Enabled = false;
                    timedActivity             = new CSharpAnalytics.Activities.AutoTimedEventActivity("GetOTP", Properties.Settings.Default.loginMethod.ToString());
                    if (Properties.Settings.Default.GAEnabled)
                    {
                        AutoMeasurement.Client.TrackEvent("GetOTP" + Properties.Settings.Default.loginMethod.ToString(), "GetOTP");
                    }
                    this.getOtpWorker.RunWorkerAsync(Properties.Settings.Default.autoSelectIndex);
                }
                if (Properties.Settings.Default.keepLogged && !this.pingWorker.IsBusy)
                {
                    this.pingWorker.RunWorkerAsync();
                }
                ShowToolTip(listView1, "步驟1", "選擇欲開啟的遊戲帳號,雙擊以複製帳號。");
                ShowToolTip(getOtpButton, "步驟2", "按下以在右側產生並自動複製密碼,至遊戲中貼上帳密登入。");
                Tip.SetToolTip(getOtpButton, "點擊獲取密碼");
                Tip.SetToolTip(listView1, "雙擊即自動複製");
                Tip.SetToolTip(textBox3, "點擊一次即自動複製");
                Properties.Settings.Default.showTip = false;
                Properties.Settings.Default.Save();
            }
            catch
            {
                errexit("登入失敗,無法取得帳號列表。", 1);
            }
        }
Ejemplo n.º 8
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     Tip.SetToolTip(close_bott, "关闭");
     Tip.SetToolTip(min_bott, "最小化");
     Tip.SetToolTip(max_bott, "最大化");
 }