Ejemplo n.º 1
0
        private void LocalizeWindow()
        {
            GridPreviewerStrings names = new GridPreviewerStrings();

            Text = names.Form.Text.GetString();

            // Panel
            uiPnl_DtGrid_TxtBx.Text = names.Ui.PanelDatasetGrid.GetString();
            EnumsLocalizer.Localize(LocalizableEnumerator.AutoSizeColumnsMode, uiPnl_AutoSize_ComBx);
            uiPnl_AutoSize_TxtBx.Text = names.Ui.PanelAutoSizeColumnsMode.GetString();
            uiPnl_Edit_TxtBx.Text     = names.Ui.PanelFastEdit.GetString();
            uiPnl_OperT_TxtBx.Text    = names.Ui.PanelOperationType.GetString();
            EnumsLocalizer.Localize(LocalizableEnumerator.Operation, uiPnl_OperT_ComBx);
            uiPnl_StartIdx_TxtBx.Text = names.Ui.PanelStartIndex.GetString();
            uiPnl_EndIdx_TxtBx.Text   = names.Ui.PanelEndIndex.GetString();
            UpdateUiBySwitchingOperationType((Operation)UiControls.TryGetSelectedIndex(uiPnl_OperT_ComBx));
            uiPnl_Reset_Btn.Text   = names.Ui.PanelReset.GetString();
            uiPnl_Perform_Btn.Text = names.Ui.PanelPerform.GetString();
            uiPnl_Refresh_Btn.Text = names.Ui.PanelRefresh.GetString();
            uiPnl_Save_Btn.Text    = names.Ui.PanelSave.GetString();
            uiPnl_Ok_Btn.Text      = names.Ui.PanelOk.GetString();

            // Grid
            uiGrid_DtSet_TxtBx.Text = names.Ui.DatasetTitle.GetString();

            // Preview
            uiChart_Prv_TxtBx.Text = names.Ui.PreviewTitle.GetString();
        }
Ejemplo n.º 2
0
        private void UpdateUiByPanelStateInfo(PanelStateInformation information)
        {
            GridPreviewerStrings names = new GridPreviewerStrings();
            string commonString        = '(' + Strings.GetTimeHeader() + ") ";

            switch (information)
            {
            case PanelStateInformation.ChangesSaved:
                uiPnl_Info_TxtBx.Text = commonString + names.Ui.PanelInfoChangesSaved.GetString();
                break;

            case PanelStateInformation.ChartNotRepainted:
                uiPnl_Info_TxtBx.Text = commonString + names.Ui.PreviewInfoChartNotRepainted.GetString();
                break;

            case PanelStateInformation.ChartRefreshed:
                uiPnl_Info_TxtBx.Text = commonString + names.Ui.PreviewInfoChartRefreshed.GetString();
                break;

            case PanelStateInformation.ChartRefreshingError:
                uiPnl_Info_TxtBx.Text = commonString + names.Ui.PreviewInfoChartRefreshError.GetString();
                break;

            case PanelStateInformation.GridPreviewerLoaded:
                uiPnl_Info_TxtBx.Text = commonString + names.Ui.PanelInfoGridPreviewerLoaded.GetString();
                break;

            case PanelStateInformation.InvalidUserValue:
                uiPnl_Info_TxtBx.Text = commonString + names.Ui.PanelInfoInvalidUserValue.GetString();
                break;

            case PanelStateInformation.OperationRejected:
                uiPnl_Info_TxtBx.Text = commonString + names.Ui.PanelInfoOperationRejected.GetString();
                break;

            case PanelStateInformation.OperationRevoked:
                uiPnl_Info_TxtBx.Text = commonString + names.Ui.PanelInfoOperationRevoked.GetString();
                break;

            case PanelStateInformation.PerformedAndRefreshed:
                uiPnl_Info_TxtBx.Text = commonString + names.Ui.PanelInfoPerformedAndRefreshed.GetString();
                break;

            case PanelStateInformation.ValuesRestored:
                uiPnl_Info_TxtBx.Text = commonString + names.Ui.PanelInfoValuesRestored.GetString();
                break;
            }
        }
Ejemplo n.º 3
0
        private void UpdateUiBySwitchingOperationType(Operation operation)
        {
            GridPreviewerStrings names = new GridPreviewerStrings();

            uiPnl_Val2_TxtBx.Enabled = true;

            switch (operation)
            {
            case Operation.Addition:
                uiPnl_Val1_TxtBx.Text = names.Ui.PanelAddend.GetString();
                break;

            case Operation.Subtraction:
                uiPnl_Val1_TxtBx.Text = names.Ui.PanelSubtrahend.GetString();
                break;

            case Operation.Multiplication:
                uiPnl_Val1_TxtBx.Text = names.Ui.PanelMultiplier.GetString();
                break;

            case Operation.Division:
                uiPnl_Val1_TxtBx.Text = names.Ui.PanelDivisor.GetString();
                break;

            case Operation.Exponentiation:
                uiPnl_Val1_TxtBx.Text = names.Ui.PanelExponent.GetString();
                break;

            case Operation.Logarithmic:
                uiPnl_Val1_TxtBx.Text = names.Ui.PanelBasis.GetString();
                break;

            case Operation.Rooting:
                uiPnl_Val1_TxtBx.Text = names.Ui.PanelBasis.GetString();
                break;

            case Operation.Constant:
                uiPnl_Val1_TxtBx.Text = names.Ui.PanelValue.GetString();
                break;

            case Operation.Positive:
            case Operation.Negative:
                uiPnl_Val1_TxtBx.Text    = names.Ui.PanelNotApplicable.GetString();
                uiPnl_Val2_TxtBx.Enabled = false;
                break;
            }
        }