public void Init(MainControl mainControl)
 {
     _mainControl    = mainControl;
     _fileFolder     = Path.Combine(_mainControl.BaseFolder, FILE_FOLDER_NAME);
     _tempFileFolder = Path.Combine(_fileFolder, TEMP_FILE_FOLDER_NAME);
     Directory.CreateDirectory(_tempFileFolder);
 }
Exemplo n.º 2
0
 public ResultForm(MainControl inControl, Matrix[,] inResult)
 {
     InitializeComponent();
     this.control = inControl;
     this.Result  = inResult;
     Initialise();
 }
Exemplo n.º 3
0
        new protected void Cmd(string cmdStr)
        {
            if (cmdStr.IndexOf("Refresh") == 0)
            {
                //メインコントロールのクリア
                Clear();

                //データ取得のため表示待機
                //ステータスバーへのテキスト表示
                SetStatusText("");
                MainControl.BackColor = SystemColors.ButtonFace;
                MainControl.Update();
                Text = "情報取得中です。しばらくお待ちください。";
            }

            if (Kernel.RunMode == RunMode.Remote)
            {
                //(ToolDlg用)データ要求(C->S)
                RemoteData.Send(sockTcp, RemoteDataKind.CmdTool, string.Format("{0}-{1}", NameTag, cmdStr));
            }
            else
            {
                //if (manager != null) {
                string buffer = Kernel.Cmd(cmdStr);//リモート操作(データ取得)
                CmdRecv(cmdStr, buffer);
                //} else {
                //    RemoteObj remoteObj = new RemoteObj(REMOTE_OBJ_KIND.CMD_TOOL,string.Format("{0}-{1}", nameTag, cmdStr));
                //    remoteObj.Send(sockTcp);
                //}
            }
        }
        public BingCorrectionMessageViewModel(MainControl control, QueryInfo info)
        {
            this.control = control;
            this.info    = info;
            Task.Run(() =>
            {
                BookName = info.BookName;

                PageNumber = info.PageNumber;

                Author = info.Author;

                CollectionCode = info.CorrectionCode;

                Press = info.Press;

                PressDate = info.PressDate;

                ClassificationName = info.ClassificationName;

                RFID = info.RFID;

                MarCode = info.CallNumber;
            });
        }
Exemplo n.º 5
0
        public void RemoveCard(bool removePermanently = false)
        {
            if (removePermanently)
            {
                MainControl.RemoveCommands(this);

                if (aboveCard != null)
                {
                    aboveCard.BelowCard = belowCard;
                }
                else if (belowCard != null)
                {
                    belowCard.AboveCard = null;
                }

                Dispose();
            }
            else
            {
                MainControl.Commands.Add(new Classes.CardCommand(this, Enums.CardCommandEnum.Remove));
                IsRemoved = true;
            }

            MainControl.UpdateBackButtonVisibility();
        }
Exemplo n.º 6
0
        public TaskFlowManagement(IUserInterfaceReport TaskReport)
        {
            _TaskReport = TaskReport;

            switch (SystemConfig.Get().TaskFlow.ToUpper())
            {
            case "KAWASAKI_3P_EFEM":
                //TaskFlow = new Kawasaki_3P_EFEM();
                break;

            case "SANWA_SORTER":
                //TaskFlow = new Sanwa_Sorter();
                break;

            case "WTS":
                //TaskFlow = new WTS();
                break;

            case "VERTICALCHAMBEROVEN_200":
                TaskFlow = new VerticalChamberOven_200(this);
                break;

            case "SANWA_EFEM":
                TaskFlow = new Sanwa_EFEM(this);;
                break;

            default:
                throw new NotSupportedException();
            }
            Ctrl = new MainControl(this);
        }
Exemplo n.º 7
0
        private void ProcessMan(MessageMan messagemMan, MainControl control)
        {
            if (messagemMan.BtAryData.Length == 2)
            {
                if (PublicData.PublicData.ManNum != messagemMan.BtAryData[1])
                {
                    AddPeopleInOrOutList addPeople = new AddPeopleInOrOutList();
                    if (PublicData.PublicData.ManNum > messagemMan.BtAryData[1])
                    {
                        PublicData.PublicData.OutNum++;
                        Task.Run(() => {
                            control.Dispatcher.Invoke(() => {
                                control.OutNum.Content = PublicData.PublicData.OutNum.ToInt() + "人";
                            });
                        });
                        PublicData.PublicData.inOrOut.Enqueue(PublicData.InOrOut.Out);
                        addPeople.AddPeopleInOrOut(PublicData.InOrOut.Out);
                    }
                    else
                    {
                        PublicData.PublicData.IntoNum++;
                        Task.Run(() => {
                            control.Dispatcher.Invoke(() => {
                                control.InNum.Content = PublicData.PublicData.IntoNum.ToInt() + "人";
                            });
                        });


                        PublicData.PublicData.inOrOut.Enqueue(PublicData.InOrOut.In);
                        addPeople.AddPeopleInOrOut(PublicData.InOrOut.In);
                    }
                    PublicData.PublicData.ManNum = messagemMan.BtAryData[1];
                }
            }
        }
Exemplo n.º 8
0
        private void ProcessPayment(string method)
        {
            Boolean hasError  = false;
            string  errorText = "";

            int selectedIndex     = Convert.ToInt32(hidPPSelectedIndex.Value);
            int paymentProviderId = -1;

            PaymentProviderBase ppUI = null;

            // if we have any Paymentproviders defined
            if (selectedIndex < 0)
            {
                hasError  = true;
                errorText = Localization.GetString("ValidPaymentProvider.Error", this.LocalResourceFile);
            }
            else
            {
                paymentProviderId = (int)lstPaymentProvider.DataKeys[selectedIndex].Value;
                if (paymentProviderId < 0)
                {
                    hasError  = true;
                    errorText = Localization.GetString("ValidPaymentProvider.Error", this.LocalResourceFile);
                }
                else
                {
                    ppUI = FindControlRecursive(divMain, "pp" + paymentProviderId.ToString()) as PaymentProviderBase;
                    if (ppUI == null)
                    {
                        hasError  = true;
                        errorText = Localization.GetString("ValidPaymentProvider.Error", this.LocalResourceFile);
                    }
                    else if (ppUI.IsValid == false)
                    {
                        hasError  = true;
                        errorText = Localization.GetString("MandatoryFields.Error", this.LocalResourceFile);
                    }
                }
            }

            if (hasError)
            {
                MainControl.ErrorText = errorText;
            }
            else
            {
                MainControl.ErrorText = "";
                UpdatePayment(ppUI);
                switch (method)
                {
                case "standard":
                    Response.Redirect(Globals.NavigateURL(TabId, "", "action=" + MainControl.GetNextAction()));
                    break;

                case "paypal":
                    StartPaypalCheckout(ppUI.Properties, paymentProviderId);
                    break;
                }
            }
        }
Exemplo n.º 9
0
        /// <summary>
        /// 取消
        /// </summary>
        public void cancel()
        {
            main.Grid.Children.Clear();
            MainControl mainControl = new MainControl(main);

            main.Grid.Children.Add(mainControl);
        }
Exemplo n.º 10
0
        private void HandleItemSelected(TreeNode selectedTreeNode)
        {
            bool shouldShow = GlueState.Self.CurrentEntitySave != null &&
                              // So this only shows if the entity itself is selected:
                              selectedTreeNode?.Tag == GlueState.Self.CurrentEntitySave;

            if (shouldShow)
            {
                if (control == null)
                {
                    control   = MainController.Self.GetControl();
                    pluginTab = this.CreateTab(control, "Platformer");
                    this.ShowTab(pluginTab, TabLocation.Center);
                }
                else
                {
                    this.ShowTab(pluginTab);
                }

                var entity = GlueState.Self.CurrentEntitySave;

                var isPlatformer = entity.Properties.GetValue <bool>("IsPlatformer");
                if (isPlatformer)
                {
                    MainController.Self.UpdateTo(GlueState.Self.CurrentEntitySave);
                }
            }
            else
            {
                this.RemoveTab(pluginTab);
            }
        }
Exemplo n.º 11
0
    /// <summary>
    /// Sets the neighborIndex as the next goal location, and the direction you need to walk to get to it
    /// Sets all the flags and also hanndles data collection
    /// </summary>
    /// <param name="neighborIndex"></param>
    /// <param name="dir"></param>
    private void MoveTo(int neighborIndex, int dir, string tag)
    {
        int myFlag       = 0;
        var nextLocation = currentLocation.GetNeighbor((HexDirection)((neighborIndex + 6) % 6));
        //**************************************
        PropPlacement propPlacement = FindObjectOfType <PropPlacement>();

        for (int i = 0; i < propPlacement.cards.Length; i++)
        {
            if (!propPlacement.cards[i].activeSelf)
            {
                if (propPlacement.cards[i].transform.position == nextLocation.transform.position)
                {
                    myFlag = 1;
                }
            }
        }
        MainControl mainControl = FindObjectOfType <MainControl>();

        if (myFlag == 1)
        {
            mainControl.updating_cards = true;
        }


        if (CanMove(nextLocation, dir) && turnController.CanMove(currentLocation.landType))
        {
            transform.position = nextLocation.transform.position;
            currentLocation    = nextLocation;
        }
    }
Exemplo n.º 12
0
        public SearchForm(CrmOrganization org, MainControl orgControl,
                          ICrmTreeNode[] rootNodes, ICrmTreeNode selectedNode)
        {
            if (rootNodes == null)
            {
                throw new ArgumentNullException("rootNodes");
            }
            else if (org == null)
            {
                throw new ArgumentNullException("org");
            }
            else if (orgControl == null)
            {
                throw new ArgumentNullException("orgControl");
            }

            InitializeComponent();

            m_org        = org;
            m_orgControl = orgControl;
            m_rootNodes  = rootNodes;

            trvPlugins.AutoExpand = m_orgControl.IsAutoExpanded;
            trvPlugins.LoadNodes(rootNodes);
            trvPlugins.SelectedNode = selectedNode;
            btnSelect.Enabled       = (trvPlugins.SelectedNode != null);

            txtSearch.AutoCompleteCustomSource = trvPlugins.NodeAutoCompleteCollection;
        }
Exemplo n.º 13
0
        public void Init(MainControl mainControl)
        {
            m_mainCon = mainControl;

            m_bOrderOK = true;
            // 공급사 출력
            this.Text = "상세 주문 - " + mainControl.m_orderData.seller;

            // 전체 작업 상태 초기화
            btnStatLogin.BackColor    = m_colRdy;
            btnStatInitCart.BackColor = m_colRdy;
            btnStatPayment.BackColor  = m_colRdy;

            // 리스트 주문 상태 출력
            OrderData orderData = m_mainCon.m_orderData;

            for (int i = 0; i < orderData.GetCount(); i++)
            {
                ListViewItem item = new ListViewItem(orderData.listSerial[i]);
                item.SubItems.Add(orderData.listName[i]);
                item.SubItems.Add(orderData.listAmount[i]);
                item.SubItems.Add("0");
                item.SubItems.Add(orderData.listCategory[i]);
                item.SubItems.Add(orderData.listCode[i]);
                item.SubItems.Add("대기");
                listOrder.Items.Add(item);
            }

            // 스레드로 작업을 해야 UI를 업데이트 할 수 있음
            m_thread = new Thread(new ThreadStart(RunThread));
            m_thread.Start();
        }
Exemplo n.º 14
0
        /// <summary>
        /// Show the tooltip without needing focus.
        /// </summary>
        /// <param name="name">Name of the tooltip</param>
        /// <param name="control">The parent control.</param>
        /// <param name="taskbarInfo">The taskbar information.</param>
        /// <param name="scaling">The scaling factor.</param>
        public void ShowWithoutRequireFocus(string name, MainControl control, TaskbarInfo taskbarInfo, double scaling)
        {
            if (!Active)
            {
                return;
            }

            int yOffset = 0;

            if (taskbarInfo.Edge == Edge.Top)
            {
                yOffset = control.Height + Margin;
            }
            else
            {
                yOffset = -Size.Height - Margin;
            }

            _scaling = scaling;
            const int TooltipTypeAbsolutePos = 2;
            var       controlScreenLocation  = control.PointToScreen(new Point(0, 0));
            var       popupLocation          = new Point(controlScreenLocation.X + (int)Math.Round(XPosition * scaling), controlScreenLocation.Y + (int)Math.Round(yOffset * scaling));

            _setToolMethod.Invoke(this, new object[] { control, name, TooltipTypeAbsolutePos, popupLocation });
        }
Exemplo n.º 15
0
        private void HandleItemSelected(TreeNode selectedTreeNode)
        {
            bool shouldShow = GlueState.Self.CurrentReferencedFileSave != null &&
                              selectedTreeNode?.Tag == GlueState.Self.CurrentReferencedFileSave &&
                              GlueState.Self.CurrentReferencedFileSave.Name.EndsWith(convertedFileType);

            if (shouldShow)
            {
                if (mainControl == null)
                {
                    mainControl = TabConroller.Self.GetControl();
                    this.AddToTab(PluginManager.CenterTab, mainControl, "Dialog Tree");
                }
                else
                {
                    this.AddTab();
                }

                TabConroller.Self.UpdateTo(GlueState.Self.CurrentReferencedFileSave);
            }
            else
            {
                this.RemoveTab();
            }
        }
    public void PopulatingFieldsTab()
    {
        MainControl control = new MainControl();

        control.PopulateFieldsTab(typeof(TestClass));
        Assert.AreEqual(4, control.listBoxFields.Items.Count);
    }
    public void PopulatingMethodsTabShouldRemoveEventMethods()
    {
        MainControl control = new MainControl();

        control.PopulateMethodsTab(typeof(TestClass));
        Assert.AreEqual(3, control.listBoxMethods.Items.Count);
    }
    public void PopulatingConstructorsTab_removes_cctor()
    {
        MainControl control = new MainControl();

        control.PopulateConstructorsTab(typeof(ClassWith_cctor));
        Assert.AreEqual(1, control.listBoxConstructors.Items.Count);
    }
 protected virtual void OnSetNullOwnedObjects()
 {
     LocalizationRepository = null;
     MainControl            = null;
     Logger    = null;
     _instance = null;
 }
Exemplo n.º 20
0
 public FuzzyRelations(MainControl inControl)
 {
     this.control         = inControl;
     MatrixOfMarks        = this.control.GetMatrix("Students", "Subjects");
     MatrixOfDevKoef      = this.control.GetMatrix("Subjects", "Skills");
     MatrixOfRequiredKoef = this.control.GetMatrix("Skills", "Vacancies");
 }
Exemplo n.º 21
0
 void Start()
 {
     source = GetComponent <AudioSource>();
     txt    = GameObject.Find("Text").GetComponent <Text>();
     main   = GameObject.Find("GvrMain").GetComponent <MainControl>();
     StartCoroutine(TypeText());
 }
Exemplo n.º 22
0
    public void ShowPursesByCurency()
    {
        GameObject[] purses      = GameObject.FindGameObjectsWithTag("Purse");
        MainControl  mainControl = GameObject.FindGameObjectWithTag("MainControl").GetComponent <MainControl>();
        PurseInfo    purseInfo   = mainControl.purseInfo;
        Vector2      posVector   = new Vector2();
        int          height      = 0;

        for (int i = 0, count = 0; i < purses.Length; i++)
        {
            OnePurse onePurse = purses[i].GetComponent <OnePurse>();
            if (onePurse.Curency != purseInfo.Curency || i == purseInfo.Index)
            {
                continue;
            }
            GameObject purse = Instantiate(pursePrefab, transform);

            purse.GetComponent <Animation>().Play("Show");
            purse.name  = i.ToString();
            posVector.x = purse.transform.localPosition.x;
            posVector.y = purse.transform.localPosition.y - (150 + 3) * count++;
            purse.transform.localPosition = posVector;

            purse.GetComponent <PurseInTransfer>().Init(onePurse.Name, onePurse.Value, purseInfo.Curency);

            height += 153;
        }
        RectTransform rect = GetComponent <RectTransform>();

        rect.sizeDelta = new Vector2(rect.sizeDelta.x, height);
    }
Exemplo n.º 23
0
        private void ActivateControl(MainControl controlType)
        {
            switch (controlType)
            {
            case MainControl.Document:
            {
                document_Center.BringToFront();
                //SetButton(Button_DocCenter);
            }
            break;

            case MainControl.Chat:
            {
                _ChatMain.BringToFront();
                _ChatMain.ActivateControl(ChatMain.MainChatControl.Room);
                //SetButton(btn_ActivateChat);
            }
            break;

            case MainControl.User:
            {
                _ChatMain.BringToFront();
                _ChatMain.ActivateControl(ChatMain.MainChatControl.User);
                //SetButton(btn_ActivateUser);
            }
            break;
            }
        }
Exemplo n.º 24
0
        private void InitializeSingleView(ISingleViewApplicationLifetime singleViewLifetime)
        {
            var builder = new ContainerBuilder();

            builder.RegisterModule <AvaloniaModule>();

            var container       = builder.Build(); // TODO: Dispose()
            var serviceProvider = container.Resolve <IServiceProvider>();

            var log    = serviceProvider.GetService <ILog>(); // TODO: Dispose()
            var fileIO = serviceProvider.GetService <IFileSystem>();

            log?.Initialize(System.IO.Path.Combine(fileIO?.GetBaseDirectory(), "Core2D.log"));

            var editor = serviceProvider.GetService <IProjectEditor>();

            var dockFactory = serviceProvider.GetService <DM.IFactory>();

            editor.Layout ??= dockFactory.CreateLayout();
            dockFactory.InitLayout(editor.Layout);

            editor.CurrentTool     = editor.Tools.FirstOrDefault(t => t.Title == "Selection");
            editor.CurrentPathTool = editor.PathTools.FirstOrDefault(t => t.Title == "Line");
            editor.IsToolIdle      = true;

            var mainView = new MainControl()
            {
                DataContext = editor
            };

            singleViewLifetime.MainView = mainView;
        }
Exemplo n.º 25
0
    public string DoAction(ActionInformation.AgentState state, int dir)
    {
        MainControl mainControl = FindObjectOfType <MainControl>();


        if (!timeKeeper.isPaused && !isMoving)
        {
            if (state == AgentState.Turning && dir == 1)
            {
                RotateTo(1);
            }
            else if (state == AgentState.Turning && dir == -1)
            {
                RotateTo(-1);
            }
            else if (state == AgentState.Walking && dir == 1)
            {
                MoveTo(directionIndex % 6, 1, tag);
            }
            else if (state == AgentState.Walking && dir == -1)
            {
                var oppositeDir = (int)HexDirectionExtensions.Opposite((HexDirection)(directionIndex % 6));
                MoveTo(oppositeDir, -1, tag);
            }
            if (gotCard)
            {
                gotCard = false;
                return("got card");
            }
        }
        //MainControl mainControl = FindObjectOfType<MainControl>();


        return("");
    }
Exemplo n.º 26
0
        private void btnXoa_Click(object sender, EventArgs e)
        {
            if (!checkNullTextBox())
            {
                MessageBox.Show("Xin mời nhập đầy đủ thông tin!", "Cảnh báo");
            }
            else
            {
                string id_customer = dgvDSTaiKhoan.CurrentRow.Cells[0].Value.ToString();
                string user_name   = dgvDSTaiKhoan.CurrentRow.Cells[1].Value.ToString();
                string pass        = dgvDSTaiKhoan.CurrentRow.Cells[2].Value.ToString();

                DialogResult dlg = MessageBox.Show("Bạn có chắc chắn muốn xóa dữ liệu này?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

                if (dlg == DialogResult.Yes)
                {
                    accCtrl.Xoa(id_customer, user_name, pass);
                    {
                        MessageBox.Show("Xóa thành công", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        accCtrl.HienThi(dgvDSTaiKhoan, id_customer);
                    }
                    if (!MainControl.onLoadCheckAccLogin())
                    {
                        loginAcc = true;
                        MessageBox.Show("Đăng xuất do bạn đã xóa tài khoản của bạn", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        this.Close();
                    }
                }
            }
        }
Exemplo n.º 27
0
        private void VerifyPaypalCheckout(SubscriberPaymentProviderInfo subscriberPaymentProvider)
        {
            string token = Request["token"];

            if (subscriberPaymentProvider != null)
            {
                string[] userCredentials   = subscriberPaymentProvider.PaymentProviderProperties.Split(',');
                PaypalUserCredentials cred = new PaypalUserCredentials(userCredentials[0], userCredentials[1], userCredentials[2]);
                PaypalApi.UseSandbox = (userCredentials.Length == 3 || (userCredentials.Length > 3 && Convert.ToBoolean(userCredentials[3]) == true));
                string response = PaypalApi.GetExpressCheckoutDetails(cred, token);
                PaypalCommonResponse ppCommon = new PaypalCommonResponse(response);
                if (ppCommon.Ack == PaypalAckType.Success)
                {
                    // TODO: Paypal Payerinfo auswerten ?
                    PaypalPayerInfo             payer = new PaypalPayerInfo(response);
                    CustomerPaymentProviderInfo customerPaymentProvider = Controller.GetCustomerPaymentProvider(MainControl.Cart.CustomerPaymentProviderID);

                    // Save token and payerid in customerpaymentprovider for later confirmation of payment in paypal
                    customerPaymentProvider.PaymentProviderValues = ppCommon.Token + "," + payer.PayerId;
                    Controller.UpdateCustomerPaymentProvider(customerPaymentProvider);
                    Response.Redirect(Globals.NavigateURL(TabId, "", "action=" + MainControl.GetNextAction()));
                }
                else
                {
                    string message = "";
                    foreach (PaypalError error in ppCommon.Errors)
                    {
                        message += String.Format("ErrorNo:{0} Message {1}<br/>\r\n", error.ErrorNo, error.LongMessage);
                    }
                    MainControl.ErrorText += message;
                }
            }
        }
Exemplo n.º 28
0
        private void btnXoa_Click(object sender, EventArgs e)
        {
            if (!checkNullTextBox())
            {
                MessageBox.Show("Xin mời nhập đầy đủ thông tin!", "Cảnh báo");
            }
            else
            {
                string id_customer = dgvDSChiTietNguoiDung.CurrentRow.Cells[0].Value.ToString();

                DialogResult dlg = MessageBox.Show("Bạn có chắc chắn muốn xóa dữ liệu này?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

                if (dlg == DialogResult.Yes)
                {
                    //delete in table customer detail
                    if (cutomerDetailCtrl.Xoa(id_customer) != -9999)
                    {
                        MessageBox.Show("Xóa thành công", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        cutomerDetailCtrl.HienThi(dgvDSChiTietNguoiDung, id_customer);
                        HienThiThongTin();
                        if (!MainControl.onLoadCheckAccLogin())
                        {
                            MessageBox.Show("Đăng xuất do bạn đã xóa tài khoản của bạn", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            this.Close();
                        }
                    }
                    else
                    {
                        MessageBox.Show("Không thể xóa thông tin người dùng này khi có mã tài khoản, các khoản thuê mượn máy", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }
        }
Exemplo n.º 29
0
        /// <summary>
        ///   Initializes a new instance.
        /// </summary>
        public Model(PreControl preControl, MainControl mainControl, EndControl endControl, Vehicle[] vehicles = null)
        {
            vehicles = vehicles ?? new[]
            {
                new Vehicle {
                    Kind = VehicleKind.OverheightVehicle
                },
                new Vehicle {
                    Kind = VehicleKind.OverheightVehicle
                },
                new Vehicle {
                    Kind = VehicleKind.HighVehicle
                }
            };

            VehicleSet = new VehicleSet(vehicles);
            VehicleSet.FinishedObserver = new FinishedObserverDisabled();

            SetupController(preControl);
            SetupController(mainControl);
            SetupController(endControl);

            HeightControl = new HeightControl(preControl, mainControl, endControl);
            Bind(nameof(VehicleSet.IsTunnelClosed), nameof(HeightControl.TrafficLights.IsRed));
        }
Exemplo n.º 30
0
 //============================================================================
 //! キーが押された時に呼ばれる
 private void _InputKey(KeyEventArgs iArgs)
 {
     //Ctrl押されてる時
     if ((Keyboard.Modifiers & ModifierKeys.Control) != ModifierKeys.None)
     {
         //全体表示
         if (iArgs.Key == Key.A)
         {
             _ContentScaling(mMinScale);
         }
         //オリジナル
         if (iArgs.Key == Key.D)
         {
             _ContentScaling(1);
         }
     }
     //その他
     else
     {
         //オプションウィンドウの切り替え
         if (iArgs.Key == Key.F1)
         {
             if (MainControl.IsOpenOptionWindow())
             {
                 MainControl.CloseOptionWindow();
             }
             else
             {
                 MainControl.OpenOptionWindow();
             }
         }
     }
 }
Exemplo n.º 31
0
        public void LoadForms(List<Entity> forms, List<Entity> scripts, MainControl plugin)
        {
            ScriptsByName.Clear();
            foreach (var script in scripts)
            {
                ScriptsByName.Add(script.GetAttributeValue<string>("name"), script);
            }

            Plugin = plugin;
            lvForms.Items.Clear();

            foreach (var form in forms)
            {
                var item = new ListViewItem(form.GetAttributeValue<string>("objecttypecode"));
                item.SubItems.Add(form.GetAttributeValue<string>("name"));
                item.Tag = form;

                lvForms.Items.Add(item);
            }
        }
Exemplo n.º 32
0
 /// <summary>
 /// Updating list of solutions from connection provided by XrmToolBox plugin class
 /// </summary>
 /// <param name="plugin">XrmToolBox plugin class</param>
 private void RetrieveSnapshot(MainControl plugin)
 {
     plugin.WorkAsync(string.Format("Getting solutions information from '{0}'...", plugin.ConnectionDetail.OrganizationFriendlyName),
         (e) => // Work To Do Asynchronously
         {
             if (string.IsNullOrEmpty(plugin.ConnectionDetail.ServerName))
             {
                 e.Result = new OrganizationSnapshot(plugin.ConnectionDetail.OrganizationServiceUrl); //Helpers.LoadSolutionFile(plugin.ConnectionDetail.OrganizationServiceUrl);
             }
             else
             {
                 e.Result = new OrganizationSnapshot(plugin.ConnectionDetail);
             }
         },
         (a) =>  // Cleanup when work has completed
         {
             this.Snapshot = (OrganizationSnapshot)a.Result;
         }
     );
 }
Exemplo n.º 33
0
        /// <summary>
        /// UIの表示
        /// </summary>
        /// <returns></returns>
        public bool LaunchUI(LaunchUiArgs args)
        {
            //実験管理ウィンドウ
            if (!args.ActivePluginWindowTypes.Contains(typeof(MainControl)))
            {
                var viewModel = new MainControlViewModel(this.Core);
                var control = new MainControl() { ViewModel = viewModel };
                this.OpenWindowRequested?.Invoke(new OpenWindowRequestArgs()
                {
                    Content = control,
                    Title = "Main Control",
                    WindowId = "MainControl",
                });
            }

            return true;
        }
Exemplo n.º 34
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.panel1 = new System.Windows.Forms.Panel();
     this.panel2 = new System.Windows.Forms.Panel();
     this.panel3 = new System.Windows.Forms.Panel();
     this.btn_versions = new System.Windows.Forms.Button();
     this.btn_cancel = new System.Windows.Forms.Button();
     this.btn_open = new System.Windows.Forms.Button();
     this.mainControl1 = new exo_jcr.msofficeplugin.common.MainControl();
     this.panel1.SuspendLayout();
     this.panel2.SuspendLayout();
     this.panel3.SuspendLayout();
     this.SuspendLayout();
     //
     // panel1
     //
     this.panel1.Controls.Add(this.mainControl1);
     this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
     this.panel1.Location = new System.Drawing.Point(0, 0);
     this.panel1.Name = "panel1";
     this.panel1.Size = new System.Drawing.Size(724, 355);
     this.panel1.TabIndex = 0;
     //
     // panel2
     //
     this.panel2.Controls.Add(this.panel3);
     this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
     this.panel2.Location = new System.Drawing.Point(0, 310);
     this.panel2.Name = "panel2";
     this.panel2.Size = new System.Drawing.Size(724, 45);
     this.panel2.TabIndex = 1;
     //
     // panel3
     //
     this.panel3.Controls.Add(this.btn_versions);
     this.panel3.Controls.Add(this.btn_cancel);
     this.panel3.Controls.Add(this.btn_open);
     this.panel3.Dock = System.Windows.Forms.DockStyle.Bottom;
     this.panel3.Location = new System.Drawing.Point(0, 0);
     this.panel3.Name = "panel3";
     this.panel3.Size = new System.Drawing.Size(724, 45);
     this.panel3.TabIndex = 0;
     //
     // btn_versions
     //
     this.btn_versions.Enabled = false;
     this.btn_versions.Location = new System.Drawing.Point(532, 10);
     this.btn_versions.Name = "btn_versions";
     this.btn_versions.Size = new System.Drawing.Size(87, 23);
     this.btn_versions.TabIndex = 2;
     this.btn_versions.Text = "Versions";
     this.btn_versions.UseVisualStyleBackColor = true;
     this.btn_versions.Click += new System.EventHandler(this.btn_versions_Click);
     //
     // btn_cancel
     //
     this.btn_cancel.Location = new System.Drawing.Point(625, 10);
     this.btn_cancel.Name = "btn_cancel";
     this.btn_cancel.Size = new System.Drawing.Size(87, 23);
     this.btn_cancel.TabIndex = 1;
     this.btn_cancel.Text = "Cancel";
     this.btn_cancel.UseVisualStyleBackColor = true;
     this.btn_cancel.Click += new System.EventHandler(this.btn_Cancel_Click);
     //
     // btn_open
     //
     this.btn_open.Location = new System.Drawing.Point(439, 10);
     this.btn_open.Name = "btn_open";
     this.btn_open.Size = new System.Drawing.Size(87, 23);
     this.btn_open.TabIndex = 0;
     this.btn_open.Text = "Open";
     this.btn_open.UseVisualStyleBackColor = true;
     this.btn_open.Click += new System.EventHandler(this.btn_open_Click);
     //
     // mainControl1
     //
     this.mainControl1.Dock = System.Windows.Forms.DockStyle.Fill;
     this.mainControl1.Location = new System.Drawing.Point(0, 0);
     this.mainControl1.Name = "mainControl1";
     this.mainControl1.Size = new System.Drawing.Size(724, 355);
     this.mainControl1.TabIndex = 0;
     //
     // NOpen
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(724, 355);
     this.Controls.Add(this.panel2);
     this.Controls.Add(this.panel1);
     this.Name = "NOpen";
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
     this.Text = "Open";
     this.panel1.ResumeLayout(false);
     this.panel2.ResumeLayout(false);
     this.panel3.ResumeLayout(false);
     this.ResumeLayout(false);
 }