Beispiel #1
0
        private static void ExecuteRedoContinue(object sender, ExecutedRelayEventArgs e)
        {
            var element = e.Parameter as GLShogiElement;

            if (element == null)
            {
                throw new ArgumentNullException("element");
            }

            try
            {
                var autoPlay = new DefaultAutoPlay(
                    element.BoardModel, true, AutoPlayType.Redo)
                {
                    IsUseEffect = false,
                };

                //TODO element.StartAutoPlay(autoPlay);
            }
            catch (Exception ex)
            {
                Util.ThrowIfFatal(ex);
                DialogUtil.ShowError(
                    "局面を連続して進めることに失敗しました ( ̄ω ̄;)");
            }
        }
Beispiel #2
0
        /// <summary>
        /// Creates and executes a push script to upload commits to the repository's server
        /// TODO: add notification to inform about queued commits
        /// </summary>
        private void ButtonPushCommits_Click(object sender, EventArgs e)
        {
            RepoDetails local = ReposConfig.GetInstance().GetSelected();

            if (local == null)
            {
                DialogUtil.Message("Push Error", "Please select a repository to push commits to.");
                return;
            }

            ServerDetails remote = ServersConfig.GetInstance().GetServerDetailsByName(local.GetServer());

            if (remote == null)
            {
                DialogUtil.Message("Push Error", "Server \"" + local.GetServer() + "\" is not available");
                return;
            }

            ScriptBuilder.PushScript(local, remote);
            Executable exe = new Executable("expect.exe", "push.lua").Start();

            exe.WaitForExit();

            EventManager.Fire(EventCode.REFRESH_CHANGES);
        }
Beispiel #3
0
        void Update()
        {
            ByteBuffer buffer = MyUtilTools.tryToLogic("AddAccount");

            if (buffer != null)
            {
                MainData.instance.user.bacnkAccount.deserialize(buffer);
                DialogUtil.tip("添加成功", true, uEvent.callback);
            }
            buffer = MyUtilTools.tryToLogic("SellerCommit");
            if (buffer != null)
            {
                MainData.instance.user.seller.deserialize(buffer);
                DialogUtil.tip("申请成功", true, new EventDelegate(uEvent.backFromRZAndRefresh));
            }
            buffer = MyUtilTools.tryToLogic("UserUpdate");
            if (buffer != null)
            {
                MainData.instance.user.deserialize(buffer);
                uEvent.backToCenter();
            }
            buffer = MyUtilTools.tryToLogic("AddressChange");
            if (buffer != null)
            {
                byte type = buffer.ReadByte();
                MainData.instance.user.deserialize(buffer);
                DialogUtil.tip(type == 1 ? "删除成功" : "添加成功", true, uEvent.callback);
            }
        }
        private void btnChange_Click(object sender, EventArgs e)
        {
            if (!tbxPassword.Text.Trim().Equals(tbxConfirmPassword.Text.Trim()))
            {
                MessageBox.Show("รหัสผ่านไม่ตรงกัน, กรุณาลองใหม่อีกครั้ง", "รหัสผ่านไม่ตรงกัน", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            else
            {
                if (tbxPassword.Text.Trim().Length < 6)
                {
                    MessageBox.Show("รหัสผ่านสั้นเกินไป, กรุณาลองใหม่อีกครั้ง", "รหัสผ่านสั้นเกินไป", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }
            }

            if (ValidateChildren())
            {
                usersBindingSource.EndEdit();
                if (1 == usersTableAdapter.Update(farmManageDataSet.Users))
                {
                    var log = new UserLogTableAdapter();
                    log.Insert(TypeUtil.User, UserID.ToString(), MainForm.User.UserID, TypeUtil.EVENT_CHANGE_PASSWORD, DateTime.Now);

                    DialogResult = DialogUtil.SaveSuccess();
                }
                else
                {
                    DialogResult = DialogUtil.SaveError();
                }
            }
        }
Beispiel #5
0
        private void ButtonFetch_Click(object sender, EventArgs e)
        {
            RepoDetails local = ReposConfig.GetInstance().GetSelected();

            if (local == null)
            {
                DialogUtil.Message("Please select a repository before fetching.");
                return;
            }

            ServerDetails remote = ServersConfig.GetInstance().GetServerDetailsByName(local.GetServer());

            if (remote == null)
            {
                DialogUtil.Message("Server \"" + local.GetServer() + "\" is not available.");
                return;
            }

            // build and execute script
            ScriptBuilder.FetchScript(local, remote);
            Executable exe = new Executable("expect.exe", "fetch.lua").Start();

            exe.WaitForExit();                            // hold thread till update

            EventManager.Fire(EventCode.REFRESH_CHANGES); // refresh changelist
        }
 private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         string currentTabName = this.tabControl1.SelectedTab.Name;
         Form   formTab        = null;
         //数据库配置
         if (currentTabName == "tabPageDbConfig")
         {
             formTab = new FormDbConfig(codeProjectInfo);
             DialogUtil.ShowTabContent(this.tabPageDbConfig, formTab, null);
         }
         //模板配置列表
         else if (currentTabName == "tabPageTemplate")
         {
             formTab = new FormTemList(codeProjectInfo);
             DialogUtil.ShowTabContent(this.tabPageTemplate, formTab, null);
         }
         //其他配置和代码生成
         else if (currentTabName == "tabPageCreate")
         {
             formTab = new FormCreate(codeProjectInfo);
             DialogUtil.ShowTabContent(this.tabPageCreate, formTab, null);
         }
     }
     catch (Exception ex)
     {
         MessageHelper.ShowError(ex);
     }
 }
Beispiel #7
0
        private void ListDataGriddView_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.RowIndex < 0 || e.ColumnIndex < 0)
                {
                    return;
                }

                if (e.ColumnIndex == 0)
                {  //单选
                   //checkbox
                    if ((bool)listDataGriddView.Rows[e.RowIndex].Cells[0].EditedFormattedValue == true)
                    {
                        listDataGriddView.Rows[e.RowIndex].Cells[0].Value = false;
                    }
                    else
                    {
                        listDataGriddView.Rows[e.RowIndex].Cells[0].Value = true;
                    }
                }

                string columnName = listDataGriddView.Columns[e.ColumnIndex].Name;
                if (columnName == "detail_row")
                {
                    FormTemAdd itemForm = new FormTemAdd(codeProjectInfo, lists[e.RowIndex].ID);
                    DialogUtil.ShowDialog(itemForm, this, itemForm.Width, itemForm.Height, new Common.prop.FormWindowProp(false, false, FormBorderStyle.FixedDialog));
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #8
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (!ValidateChildren())
            {
                return;
            }

            String CustomerPID = (String)customerTableAdapter.InsertQuery(
                tbxPID.Text,
                Convert.ToByte(cbxPrename.SelectedValue),
                tbxfName.Text,
                tbxlName.Text,
                cbxCompany.SelectedValue == null ? new Int32?() : Convert.ToInt32(cbxCompany.SelectedValue),
                tbxAddress.Text,
                tbxStreed.Text,
                tbxPhone.Text,
                tbxMobile.Text,
                cbxCityID.SelectedValue == null ? new Int32?() : Convert.ToInt32(cbxCityID.SelectedValue),
                cbxDistrictID.SelectedValue == null ? new Int32?() : Convert.ToInt32(cbxDistrictID.SelectedValue),
                cbxProvinceID.SelectedValue == null ? new Int32?() : Convert.ToInt32(cbxProvinceID.SelectedValue),
                cbxPostCode.SelectedValue == null ? new Int32?() : Convert.ToInt32(cbxPostCode.SelectedValue));

            if (CustomerPID != null)
            {
                UserLogTableAdapter logTableAdapter = new UserLogTableAdapter();
                logTableAdapter.Insert(TypeUtil.Customer, CustomerPID, MainForm.User.UserID, TypeUtil.EVENT_CREATE, DateTime.Now);

                DialogResult = DialogUtil.AddSuccess();
            }
            else
            {
                DialogResult = DialogUtil.AddError();
            }
        }
Beispiel #9
0
        /// <summary>
        /// 放送に接続します。
        /// </summary>
        private void ConnectButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (!this.nicoClient.IsLogin)
                {
                    MessageBox.Show(
                        "ログインしていません。",
                        "エラー",
                        MessageBoxButton.OK,
                        MessageBoxImage.Error);
                    return;
                }

                /*Live.LiveInfo.Create(
                 *  "lv203771397",
                 *  this.nicoClient.CookieContainer);*/

                this.commentClient.Connect(
                    LiveUrl,
                    this.nicoClient.CookieContainer);
                this.commentClient.StartReceiveMessage(1000);
            }
            catch (Exception ex)
            {
                DialogUtil.ShowError(ex,
                                     "放送への接続に失敗しました。");
                return;
            }

            DialogUtil.Show(
                "接続に成功しました。",
                "OK",
                MessageBoxButton.OK);
        }
Beispiel #10
0
 public void deleteMore()
 {
     if (list_container != null)
     {
         string    ids   = "";
         Transform trans = list_container.transform;
         for (int i = 0; i < trans.childCount; i++)
         {
             Transform sun    = trans.GetChild(i);
             UIToggle  toggle = sun.FindChild("delete-flag").GetComponent <UIToggle>();
             if (toggle.value)
             {
                 string[] ss = sun.name.Split("-"[0]);
                 ids += ss[1] + ",";
             }
         }
         if (!MyUtilTools.stringIsNull(ids))
         {
             SendMessageEntity entity = new SendMessageEntity();
             entity.buffer.skip(4);
             entity.buffer.WriteString("DeleteEmail");
             entity.buffer.WriteLong(MainData.instance.user.id);
             entity.buffer.WriteString(ids);
             EventDelegate sure = new EventDelegate(this, "confirmDeleteMore");
             sure.parameters[0]     = new EventDelegate.Parameter();
             sure.parameters[0].obj = entity;
             ConfirmUtil.confirm("是否删除选中的邮件", sure);
         }
         else
         {
             DialogUtil.tip("请选择要删除的邮件");
         }
     }
 }
Beispiel #11
0
    // Update is called once per frame
    void Update()
    {
        ByteBuffer buffer = MyUtilTools.tryToLogic("AdminMemberSearch");

        if (buffer != null)
        {
            int size = buffer.ReadInt();
            if (size > 0)
            {
                selectIndex = 0;
                users.Clear();
                for (int i = 0; i < size; i++)
                {
                    MainData.UserData user = new MainData.UserData();
                    user.deserialize(buffer);
                    users.Add(user);
                }
                refresh();
            }
            else
            {
                DialogUtil.tip("查找不到相关数据");
            }
        }
        buffer = MyUtilTools.tryToLogic("AdminUserResetPwd");
        if (buffer != null)
        {
            DialogUtil.tip(buffer.ReadString(), true);
        }
        buffer = MyUtilTools.tryToLogic("AdminUserCommit");
        if (buffer != null)
        {
            DialogUtil.tip("提交成功", true);
        }
    }
        private void btnAdd_Click_1(object sender, EventArgs e)
        {
            AccoutEncFrm AccoutEncFrm = new AccoutEncFrm();

            AccoutEncFrm.RefeshParentWindow = BtnRefesh_ParentWindow;
            DialogUtil.ShowDialog(AccoutEncFrm, this, 883, 519, new FormWindowProp(false, false, FormBorderStyle.FixedSingle));
        }
        private void ListDataGriddView_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.RowIndex < 0 || e.ColumnIndex < 0)
                {
                    return;
                }

                if (e.ColumnIndex == 0)
                {  //单选
                   //checkbox
                    if ((bool)listDataGriddView.Rows[e.RowIndex].Cells[0].EditedFormattedValue == true)
                    {
                        listDataGriddView.Rows[e.RowIndex].Cells[0].Value = false;
                    }
                    else
                    {
                        listDataGriddView.Rows[e.RowIndex].Cells[0].Value = true;
                    }
                }

                string columnName = listDataGriddView.Columns[e.ColumnIndex].Name;
                //删除
                if (columnName == "detail_row")
                {
                    AccoutEncFrm accoutEncFrm = new AccoutEncFrm(listData[e.RowIndex]);
                    DialogUtil.ShowDialog(accoutEncFrm, this, accoutEncFrm.Width, accoutEncFrm.Height, null);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #14
0
    void sure(GameObject container, bool flag)
    {
        Transform level      = container.transform.FindChild("level");
        UIToggle  good       = level.FindChild("good").GetComponent <UIToggle>();
        UIToggle  normal     = level.FindChild("normal").GetComponent <UIToggle>();
        byte      type       = (byte)(good.value ? 3 : (normal ? 2 : 1));
        UIInput   inputFiled = container.transform.FindChild("inputer").GetComponent <UIInput>();

        if (MyUtilTools.stringIsNull(inputFiled.value))
        {
            UILabel label = inputFiled.transform.FindChild("tips").GetComponent <UILabel>();
            DialogUtil.tip(label.text);
            return;
        }
        ByteBuffer buffer = ByteBuffer.Allocate(1024);

        buffer.skip(4);
        buffer.WriteString("Appraise");
        buffer.WriteByte((byte)(flag?1:0));
        buffer.WriteLong(order.dealId);
        buffer.WriteLong(order.id);
        buffer.WriteByte(type);
        buffer.WriteString(inputFiled.value);
        NetUtil.getInstance.SendMessage(buffer);
    }
        private void ChooseIcon_Click(object sender, RoutedEventArgs e)
        {
            OpenFileDialog fd = new OpenFileDialog();

            fd.Multiselect      = false;
            fd.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
            fd.Filter           = "Image files (*.jpg, *.jpeg, *.jpe, *.jfif, *.png, *.ico) | *.jpg; *.jpeg; *.jpe; *.jfif; *.png; *.ico";

            if (fd.ShowDialog() == true)
            {
                var fileInfo = new FileInfo(fd.FileName);
                if (fileInfo.Length > 200 * 1024)
                {
                    DialogUtil.showError(parent, "The image size should no more than 200KB");
                }
                else
                {
                    var img = new BitmapImage(new Uri(fd.FileName));
                    if (img.PixelHeight > 128 || img.PixelWidth > 128)
                    {
                        DialogUtil.showError(parent, "The image width and height should mo more than 128 pixel");
                    }
                    else
                    {
                        QCommand.Img = img;
                    }
                }
            }
        }
Beispiel #16
0
 void uploadPicOk(SendMessageEntity entity, UITexture texture1, UITexture texture2)
 {
     if (texture1 != null && texture2 != null)
     {
         EventDelegate ok = new EventDelegate(this, "uploadPicOk");
         ok.parameters[0]     = new EventDelegate.Parameter();
         ok.parameters[0].obj = entity;
         ok.parameters[1]     = new EventDelegate.Parameter();
         ok.parameters[1].obj = texture2;
         ok.parameters[2]     = new EventDelegate.Parameter();
         ok.parameters[2].obj = null;
         JustRun.Instance.upLoadPic(entity.names[1], ((Texture2D)texture1.mainTexture).EncodeToJPG(), ok, new EventDelegate(uploadPicFail));
     }
     else if (texture1 != null && texture2 == null)
     {
         EventDelegate ok = new EventDelegate(this, "uploadPicOk");
         ok.parameters[0]     = new EventDelegate.Parameter();
         ok.parameters[0].obj = entity;
         ok.parameters[1]     = new EventDelegate.Parameter();
         ok.parameters[1].obj = null;
         ok.parameters[2]     = new EventDelegate.Parameter();
         ok.parameters[2].obj = null;
         JustRun.Instance.upLoadPic(entity.names[2], ((Texture2D)texture1.mainTexture).EncodeToJPG(), ok, new EventDelegate(uploadPicFail));
     }
     else
     {
         isUploaded = true;
         LoadUtil.show(false);
         EventDelegate next = new EventDelegate(this, "sendMessage");
         next.parameters[0]     = new EventDelegate.Parameter();
         next.parameters[0].obj = entity;
         DialogUtil.tip("图片上传成功点击确定继续", true, next);
     }
 }
Beispiel #17
0
        /// <summary>
        /// 接続処理
        /// </summary>
        private void ConnectButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (!this.nicoClient.IsLogin)
                {
                    MessageBox.Show(
                        "ログインしていません。",
                        "エラー",
                        MessageBoxButton.OK,
                        MessageBoxImage.Error);
                    return;
                }

                this.commentClient.Connect(
                    LiveUrl,
                    this.nicoClient.CookieContainer);
            }
            catch (Exception ex)
            {
                DialogUtil.ShowError(ex,
                                     "放送への接続に失敗しました。");
                return;
            }
        }
Beispiel #18
0
    // Update is called once per frame
    void Update()
    {
        ByteBuffer buffer = MyUtilTools.tryToLogic("OpenAccountApply");

        if (buffer != null)
        {
            isUploaded = false;
            DialogUtil.tip("申请成功", true, new EventDelegate(backToCenter));
        }

        /*
         * buffer = MyUtilTools.tryToLogic("Token");
         * if (buffer != null)
         * {
         *  startTime = DateTime.Now.Ticks / 10000000;
         *  tokenButton.SetState(UIButtonColor.State.Disabled,true);
         * }
         * if (startTime > 0)
         * {
         *  long now = DateTime.Now.Ticks / 10000000;
         *  int fix = (int)(now - startTime);
         *  if (fix >= 60)
         *  {
         *      initPhoneSend();
         *  }
         *  else
         *  {
         *      tokenLabe.text = "重发(" + MyUtilTools.numToString(60 - fix) + ")秒";
         *  }
         * }*/
    }
        private void btnSave_Click(object sender, EventArgs e)
        {
            gxbDetail.Enabled = false;
            btnSave.Enabled   = false;
            if (Validate())
            {
                usersBindingSource.EndEdit();
                if (1 == usersTableAdapter.Update(farmManageDataSet.Users))
                {
                    var log = new UserLogTableAdapter();
                    log.Insert(TypeUtil.User, UserID.ToString(), MainForm.User.UserID, TypeUtil.EVENT_MODIFY, DateTime.Now);

                    DialogResult = DialogUtil.SaveSuccess();
                }
                else
                {
                    DialogResult = DialogUtil.SaveError();
                }
            }
            else
            {
                gxbDetail.Enabled = true;
                btnSave.Enabled   = true;
            }
        }
Beispiel #20
0
    // Update is called once per frame
    void Update()
    {
        ByteBuffer buffer = MyUtilTools.tryToLogic("Regist");

        if (buffer != null)
        {
            //注册成功
            DialogUtil.tip(buffer.ReadString());
            clearInputs();
        }
        buffer = MyUtilTools.tryToLogic("Token");
        if (buffer != null)
        {
            startTime = System.DateTime.Now.Ticks / 10000000;
            tokenButton.SetState(UIButtonColor.State.Disabled, true);
        }
        if (startTime > 0)
        {
            long now = System.DateTime.Now.Ticks / 10000000;
            int  fix = (int)(now - startTime);
            if (fix >= 60)
            {
                init();
            }
            else
            {
                tokenLabe.text = "重发(" + MyUtilTools.numToString(60 - fix) + ")秒";
            }
        }
    }
Beispiel #21
0
 public virtual void ReturnData(IList list)
 {
     if (list != null && list.Count > 0)
     {
         DialogUtil.SetCachedObj(this, list.Cast <Goods>().Select(x => x.ID).ToList());
     }
 }
Beispiel #22
0
        /// <summary>
        /// ログインデータからログインを行います。
        /// 自動ログイン時などに使われます。
        /// </summary>
        private void ExecuteLogin(object sender, ExecutedRoutedEventArgs e)
        {
            if (this.model == null)
            {
                return;
            }

            try
            {
                // ログイン処理を行い、必要ならダイアログを表示します。
                var loginData = LoginInternal();
                if (loginData != null)
                {
                    if (IsShowMessageDialog)
                    {
                        DialogUtil.Show(
                            "ログインできました。ヽ( *^∇^*)ノ*:・'゚☆",
                            "OK",
                            MessageBoxButton.OK);
                    }

                    DialogResult = true;
                }
                else
                {
                    DialogUtil.ShowError(
                        "ログインできませんでした。( ´ω`)");
                }
            }
            catch (Exception ex)
            {
                DialogUtil.ShowError(ex,
                                     "ログインに失敗しました。( ´ω`)");
            }
        }
Beispiel #23
0
        public void OnImportSharedFavButton(Office.IRibbonControl control)
        {
            logger.Log("Import button clicked.");
            if (!this.AskForImportConfirmation())
            {
                logger.Log("User cancelled import.");
                return;
            }
            var filePath = DialogUtil.GetFilePathViaDialog(isSaveAction: false);

            if (filePath != null)
            {
                if (this.importExportService.ImportFromFile(filePath))
                {
                    //import is done. Maybe set theme as default?
                    if (shapePersistence.GetPersistedTheme() == null)
                    {
                        //no theme to import
                        MessageBox.Show("Successfully imported favorites.");
                    }
                    else
                    {
                        HandlePersistedThemeImport();
                    }
                }
                else
                {
                    MessageBox.Show("An error occured while importing favorites.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Beispiel #24
0
        void Update()
        {
            bool       flag   = false;
            ByteBuffer buffer = MyUtilTools.tryToLogic("DealDel");

            if (buffer != null)
            {
                DialogUtil.tip("撤销成功", true);
            }
            buffer = MyUtilTools.tryToLogic("RevertDel");
            if (buffer != null)
            {
                DialogUtil.tip("操作成功", true);
            }
            buffer = MyUtilTools.tryToLogic("UserLook");
            if (buffer != null)
            {
                dealEvent.toLook(buffer);
            }
            buffer = MyUtilTools.tryToLogic("DealIssue");
            if (buffer != null)
            {
                DialogUtil.tip(buffer.ReadString(), true);
            }
            if (flag)
            {
                dealEvent.updateList();
            }
        }
Beispiel #25
0
        /// <summary>
        /// Creates and executes a commit script based on the currently selected repository.
        /// </summary>
        private void ButtonCommitChanges_Click(object sender, EventArgs e)
        {
            string commitmsg = TextBoxCommitMessage.Text;

            if (commitmsg.Equals("") || commitmsg.Equals(ApplicationConstant.COMMIT_GREYTEXT))
            {
                DialogUtil.Message("Commit Error", "Please add a commit message before committing.");
                return;
            }

            RepoDetails repo = ReposConfig.GetInstance().GetSelected();

            if (repo == null)
            {
                DialogUtil.Message("Commit Error", "Please select a repository to commit to.");
                return;
            }

            ScriptBuilder.CommitScript(repo, TextBoxCommitMessage.Text);
            Executable exe = new Executable("expect.exe", "commit.lua").Start();

            exe.WaitForExit();

            TextBoxCommitMessage.Text = ""; // will not show greytext
            TextBoxCommitMessage_Validate(TextBoxCommitMessage, e);
            EventManager.Fire(EventCode.REFRESH_CHANGES);
        }
Beispiel #26
0
        public ImportInfoProxy(IRemoteUrl ui)
        {
            _ui = ui;

            _imgBytes = imageToBytes(Resources.DefaultThumbnail);
            if (!string.IsNullOrWhiteSpace(ui.LocalPath))
            {
                _proxy = new VideoDataInfoProxy();
                _proxy.TreeNodesReceived += proxy_TreeNodesReceived;
                _proxy.MessageReceived   += proxy_MessageReceived;
                _proxy.UpdateSource(new VideoDataSource()
                {
                    SrcType         = SourceType.Local,
                    LocalSourcePath = ui.LocalPath
                });
                try
                {
                    _proxy.GetVideoTreeNodesAsync();
                }
                catch (Exception ex)
                {
                    Logger.Default.Error("获取视频信息失败!", ex);
                    string msg = "获取视频信息失败!\n" + ex.Message;
                    DialogUtil.ShowError(msg);
                }
            }
            else
            {
                buildNodeRoot(ui.VideoInfos);
            }
        }
Beispiel #27
0
        void Update()
        {
            ByteBuffer buffer = MyUtilTools.tryToLogic("AddressChange");

            if (buffer != null)
            {
                byte type = buffer.ReadByte();
                MainData.instance.user.deserialize(buffer);
                DialogUtil.tip(type == 1 ? "删除成功" : "添加成功", true, new EventDelegate(infoEvent.refreshAddressList));
            }
            if (isPressed)
            {
                count++;
                if (count > 50)
                {
                    openPop();
                    count = 0;
                }
            }
            else
            {
                if (delete_obj.activeSelf)
                {
                    popCount--;
                    if (popCount <= 0)
                    {
                        delete_obj.SetActive(false);
                    }
                }
            }
        }
Beispiel #28
0
    // Update is called once per frame
    void Update()
    {
        if (pushs.Count == 0)
        {
            return;
        }
        if (!ConfirmUtil.isConfirmShow() && !LoadUtil.isActivity() && !DialogUtil.isPopTips())
        {
            if (!isOpen)
            {
                tryToOpenPush();
            }
        }
        ByteBuffer buffer = MyUtilTools.tryToLogic("DealGrab");

        if (buffer != null)
        {
            DialogUtil.tip("抢单成功", true);
        }
        buffer = MyUtilTools.tryToLogic("DealFavorite");
        if (buffer != null)
        {
            int type = buffer.ReadInt();
            int len  = buffer.ReadInt();
            MainData.instance.user.favorites.Clear();
            for (int i = 0; i < len; i++)
            {
                long value = buffer.ReadLong();
                MainData.instance.user.favorites.Add(value);
            }
            DialogUtil.tip(type == 0 ? "收藏成功" : "取消收藏成功", true);
        }
    }
Beispiel #29
0
        void Update()
        {
            ByteBuffer buffer = MyUtilTools.tryToLogic("BankAccountDel");

            if (buffer != null)
            {
                DialogUtil.tip("删除成功", true, new EventDelegate(infoEvent.refreshAccountList));
            }
            if (isPressed)
            {
                count++;
                if (count > 50)
                {
                    openPop();
                    count = 0;
                }
            }
            else
            {
                if (delete_obj.activeSelf)
                {
                    popCount--;
                    if (popCount <= 0)
                    {
                        delete_obj.SetActive(false);
                    }
                }
            }
        }
Beispiel #30
0
        /// <summary>
        /// 棋譜ファイルの書き込みを行います。
        /// </summary>
        public static void SaveKif(ShogiUIElement3D control, TextWriter writer)
        {
            try
            {
                if (control == null || writer == null)
                {
                    return;
                }

                //var manager = model.MoveManager;
                //var root = manager.CreateVariationNode(control.Board);

                var headers = new Dictionary <string, string>();
                headers["先手"] = control.BlackPlayerName;
                headers["後手"] = control.WhitePlayerName;

                //var kifu = new KifuObject(headers, null);
                //KifuWriter.Save(writer, kifu);
            }
            catch (Exception ex)
            {
                DialogUtil.ShowError(ex,
                                     "棋譜ファイルの出力に失敗しました( ̄ω ̄;)");
            }
        }