コード例 #1
0
        /// <summary>
        /// Constructs new Font_Size_List_Context for given OptionsWindow.
        /// </summary>
        internal Langauge_List_Context(IStandard_Messages_Translate Standard_Messages, Languages Current_Language)
        {
            Langauge_List_Items_List = Set_Languge_List_Items(Standard_Messages);

            Language_List_ComboBox_SelectedItem =
                Set_Current_Language_In_ComboBox(Current_Language);
        }
コード例 #2
0
        /// <summary>
        /// Constructs new Number_Notation_List_Context for given OptionsWindow.
        /// </summary>
        internal Number_Notation_List_Context(IStandard_Messages_Translate Standard_Messages, Number_Notation Number_Notation)
        {
            Number_Notation_List_Items_List = Set_Number_Notation_List_Items(Standard_Messages);

            Number_Notation_List_ComboBox_SelectedItem =
                Set_Current_Number_Notation_In_ComboBox(Number_Notation);
        }
コード例 #3
0
        private void Set_Main_Menu_Text(IStandard_Messages_Translate standard_Messages)
        {
            // \Main_Menu.xml

            File         = standard_Messages.Translate("File");
            View         = standard_Messages.Translate("View");
            Edit         = standard_Messages.Translate("Edit");
            Help         = standard_Messages.Translate("Help");
            New_Window   = standard_Messages.Translate("New_Window");
            Options      = standard_Messages.Translate("Options");
            Close_Window = standard_Messages.Translate("Close_Window");
            Standard     = standard_Messages.Translate("Standard");
            Scientific   = standard_Messages.Translate("Scientific");

            On_Properties_Change(new string[] {
                "File",
                "View",
                "Edit",
                "Help",
                "New_Window",
                "Options",
                "Close_Window",
                "Standard",
                "Scientific"
            });
        }
コード例 #4
0
        /// <summary>
        /// Constructs new Font_Size_List_Context for given OptionsWindow.
        /// </summary>
        internal Font_Size_List_Context(IStandard_Messages_Translate Standard_Messages, Font_Size_Type _Font_Size_Type)
        {
            Font_Size_Items_List = Set_Font_Size_List_Items(Standard_Messages);

            Font_Size_List_ComboBox_SelectedItem =
                Set_Current_Font_Size_In_ComboBox(_Font_Size_Type);
        }
コード例 #5
0
 /// <summary>
 /// Sets texts for list_Item in Number_Notation_Items_List.
 /// </summary>
 public void Set_Number_Notation_Texts(IStandard_Messages_Translate standard_Messages)
 {
     foreach (Number_Notation_List_Item list_Item in Number_Notation_List_Items_List)
     {
         list_Item.Set_Number_Notation_Name(
             standard_Messages.Translate(list_Item.Number_Notation.ToString() + "_Notation"));
     }
 }
コード例 #6
0
 /// <summary>
 /// Sets texts for list_Item in Font_Size_Items_List.
 /// </summary>
 internal override void Set_Item_Text(IStandard_Messages_Translate Standard_Messages)
 {
     foreach (Font_Size_List_Item list_Item in Font_Size_Items_List)
     {
         list_Item.Set_Font_Size_Name(
             Standard_Messages.Translate(list_Item.Font_Size.ToString() + "_Font_Size"));
     }
 }
コード例 #7
0
        /// <summary>
        /// Constructs item for given Language.
        /// </summary>
        internal Langauge_List_Items(IStandard_Messages_Translate Standard_Messages, Languages _Language)
        {
            Language = _Language;

            Language_Name = Standard_Messages.Translate(Language.ToString() + "_Native");

            Language_Flag_Uri = AppDomain.CurrentDomain.BaseDirectory + @"Library\Images\Language_Flags\" + Language.ToString() + "_Flag.png";
        }
コード例 #8
0
        /// <summary>
        /// Constructs item for given Font_Size.
        /// </summary>
        internal Font_Size_List_Item(IStandard_Messages_Translate Standard_Messages, Font_Size_Type _Font_Size)
        {
            Font_Size = _Font_Size;

            Font_Size_Name = Standard_Messages.Translate(Font_Size.ToString() + "_Font_Size");

            Font_Size_Symbol_Uri = AppDomain.CurrentDomain.BaseDirectory + @"Library\Image\Font_Size\" + Font_Size.ToString() + "_Flag.png";
        }
コード例 #9
0
        /// <summary>
        /// Constructs new Comma_Type_List_Context for given OptionsWindow.
        /// </summary>
        internal Comma_Type_List_Context(IStandard_Messages_Translate Standard_Messages, IOptions_Provider Options_Provider)
        {
            Commas_Type = Options_Provider.Commas_Type_Array;

            Factory = new Commas_Type_Item_Factory(this, Standard_Messages);

            Comma_Type_Items_List = Set_Comma_Type_Items_List();

            Comma_Type_List_ComboBox_SelectedItem = Set_Comma_Type_List_ComboBox_SelectedItem(Options_Provider);
        }
コード例 #10
0
        /// <summary>
        /// Constructs new Numeral_System_List_Context for given OptionsWindow.
        /// </summary>
        internal Numeral_System_List_Context(IStandard_Messages_Translate Standard_Messages, sbyte numeral_System_Code)
        {
            Factory = new Numeral_System_List_Content_Factory(this, Standard_Messages);

            Items_List = Set_Numeral_System_List();

            Pinned_Items_List = Set_Pinned_Numeral_System_List();

            Numeral_System_List_ComboBox_SelectedItem =
                Set_Numeral_System_List_ComboBox_SelectedItem(numeral_System_Code);
        }
コード例 #11
0
        /// <summary>
        /// Sets list of Calculator_Mode_List_Content.
        /// </summary>
        private List <ICalculator_Mode_List_Item> Set_Calculator_Mode_List_Items(IStandard_Messages_Translate Standard_Messages)
        {
            List <ICalculator_Mode_List_Item> Output_Items_List = new List <ICalculator_Mode_List_Item>();

            foreach (Calculator_Mode Calculator_Mode in (Calculator_Mode[])Enum.GetValues(typeof(Calculator_Mode)))
            {
                Output_Items_List.Add(new Calculator_Mode_List_Item(Standard_Messages, Calculator_Mode));
            }

            return(Output_Items_List);
        }
コード例 #12
0
        /// <summary>
        /// Sets list of Font_Size_List_Content.
        /// </summary>
        private List <IFont_Size_List_Item> Set_Font_Size_List_Items(IStandard_Messages_Translate Standard_Messages)
        {
            List <IFont_Size_List_Item> Output_Items_List = new List <IFont_Size_List_Item>();

            foreach (Font_Size_Type font_Size in (Font_Size_Type[])Enum.GetValues(typeof(Font_Size_Type)))
            {
                Output_Items_List.Add(new Font_Size_List_Item(Standard_Messages, font_Size));
            }

            return(Output_Items_List);
        }
コード例 #13
0
        /// <summary>
        /// Sets list of Number_Notation_List_Content.
        /// </summary>
        private List <INumber_Notation_List_Item> Set_Number_Notation_List_Items(IStandard_Messages_Translate Standard_Messages)
        {
            List <INumber_Notation_List_Item> Output_Items_List = new List <INumber_Notation_List_Item>();

            foreach (Number_Notation number_Notation in (Number_Notation[])Enum.GetValues(typeof(Number_Notation)))
            {
                Output_Items_List.Add(new Number_Notation_List_Item(Standard_Messages, number_Notation));
            }

            return(Output_Items_List);
        }
コード例 #14
0
        /// <summary>
        /// Sets list of Language_List_Content.
        /// </summary>
        private List <ILangauge_List_Items> Set_Languge_List_Items(IStandard_Messages_Translate Standard_Messages)
        {
            List <ILangauge_List_Items> Output_Items_List = new List <ILangauge_List_Items>();

            foreach (Languages language in (Languages[])Enum.GetValues(typeof(Languages)))
            {
                Output_Items_List.Add(new Langauge_List_Items(Standard_Messages, language));
            }

            return(Output_Items_List);
        }
コード例 #15
0
        private void Set_General_Options_Texts(IStandard_Messages_Translate standard_Messages)
        {
            Language_Name       = standard_Messages.Translate("Language");
            Font_Size_Type_Name = standard_Messages.Translate("Font_Size_Type");

            On_Properties_Change(new string[]
            {
                "Language_Name",
                "Font_Size_Type_Name"
            });
        }
コード例 #16
0
        public void Set_Texts_Turntable(IStandard_Messages_Translate standard_Messages)
        {
            GUI_Bindable_Resources.Set_Texts(standard_Messages);

            List <IMainWindow_Children> Children_List =
                Windows_Structure.Windows_Manager.Get_MainWindow_Children_List(this).This_Children_List;

            foreach (IMainWindow_Children children in Children_List)
            {
                children.Push_Set_Text(Options.Standard_Messages);
            }
        }
コード例 #17
0
        /// <summary>
        /// Sets texts for list_Item in Numeral_System_Items_List.
        /// </summary>
        public void Set_Numeral_System_Texts(IStandard_Messages_Translate standard_Messages)
        {
            foreach (Numeral_System_List_Content list_Content in Numeral_System_List_Items_List)
            {
                if (list_Content is Item_Numeral_System_List list_Item)
                {
                    string new_Numeral_System_Name = Numeral_System.Numeral_System_Dictionary_Name(
                        list_Item.Numeral_System_Code, standard_Messages);

                    list_Item.Set_Numeral_System_Name(new_Numeral_System_Name);
                }
            }
        }
コード例 #18
0
        private void Set_Calculator_annihilator_Text(IStandard_Messages_Translate standard_Messages)
        {
            // \Calculator_Annihilator.xml

            Title = standard_Messages.Translate("Title");
            Single_Calculations  = standard_Messages.Translate("Single_Calculations");
            Complex_Calculations = standard_Messages.Translate("Complex_Calculations");

            On_Properties_Change(new string[] {
                "Title",
                "Single_Calculations",
                "Complex_Calculations"
            });
        }
コード例 #19
0
        private void Set_Buttons_Texts(IStandard_Messages_Translate standard_Messages)
        {
            Apply_All_Windows = standard_Messages.Translate("Apply_All_Windows");
            Ok     = standard_Messages.Translate("Ok");
            Cancel = standard_Messages.Translate("Cancel");
            Apply  = standard_Messages.Translate("Apply");

            On_Properties_Change(new string[]
            {
                "Apply_All_Windows",
                "Ok",
                "Cancel",
                "Apply"
            });
        }
コード例 #20
0
        private void Set_Calculator_Options_Text(IStandard_Messages_Translate standard_Messages)
        {
            Number_Notation_Type = standard_Messages.Translate("Number_Notation_Type");
            Numeral_System_Type  = standard_Messages.Translate("Numeral_System_Type");
            Comma_Symbol         = standard_Messages.Translate("Comma_Symbol");
            Mode_Calculator      = standard_Messages.Translate("Mode_Calculator");
            Method_Calculation   = standard_Messages.Translate("Method_Calculation");

            On_Properties_Change(new string[]
            {
                "Number_Notation_Type",
                "Numeral_System_Type",
                "Comma_Symbol",
                "Mode_Calculator",
                "Method_Calculation"
            });
        }
コード例 #21
0
        /// <summary>
        /// Sets bindable texts according to currently setted language.
        /// </summary>
        public void Set_Text(IStandard_Messages_Translate standard_Messages)
        {
            Set_Tab_Item_Texts(standard_Messages);

            Set_General_Options_Texts(standard_Messages);

            Set_Buttons_Texts(standard_Messages);

            Set_Calculator_Options_Text(standard_Messages);

            _Comma_Type_List_Context.Set_Item_Text(standard_Messages);

            _Number_Notation_List_Context.Set_Item_Text(standard_Messages);

            _Langauge_List_Context.Set_Item_Text(standard_Messages);

            _Font_Size_List_Context.Set_Item_Text(standard_Messages);

            _Numeral_System_List_Context.Set_Item_Text(standard_Messages);
        }
コード例 #22
0
 internal override void Set_Item_Text(IStandard_Messages_Translate Standard_Messages)
 {
 }
コード例 #23
0
        /// <summary>
        /// Constructs item for given Number_Notation.
        /// </summary>
        internal Number_Notation_List_Item(IStandard_Messages_Translate Standard_Messages, Number_Notation _Number_Notation)
        {
            Number_Notation = _Number_Notation;

            Number_Notation_Name = Standard_Messages.Translate(Number_Notation.ToString() + "_Notation");
        }
コード例 #24
0
        public static string Numeral_System_Dictionary_Name(sbyte numeral_System_Code, IStandard_Messages_Translate standard_Messages)
        {
            if (numeral_System_Code > 0 && numeral_System_Code < 65)
            {
                return(standard_Messages.Translate("N-Base_Numeral_System",
                                                   new string[] { numeral_System_Code.ToString() }));
            }

            switch (numeral_System_Code)
            {
            case -2:
                return(standard_Messages.Translate("Negabinary_Numeral_System"));

            case -3:
                return(standard_Messages.Translate("Balanced_Ternary_Numeral_System"));
            }

            return(standard_Messages.Translate("Unknown_Numeral_System"));
        }
コード例 #25
0
        /// <summary>
        /// Constructs item for given Calculation_Method.
        /// </summary>
        internal Calculation_Method_List_Item(IStandard_Messages_Translate Standard_Messages, Calculation_Method _Calculation_Method)
        {
            Calculation_Method = _Calculation_Method;

            Calculation_Method_Name = Standard_Messages.Translate(Calculation_Method.ToString());
        }
コード例 #26
0
 internal override void Set_Item_Text(IStandard_Messages_Translate Standard_Messages)
 {
     throw new NotImplementedException();
 }
コード例 #27
0
        internal Commas_Type_Item_Factory(Comma_Type_List_Context _Comma_Type_List_Context, IStandard_Messages_Translate _Standard_Messages)
        {
            Comma_Type_List_Context = _Comma_Type_List_Context;

            Standard_Messages = _Standard_Messages;
        }
コード例 #28
0
        internal Calculation_Method_List_Context(IStandard_Messages_Translate Standard_Messages, Calculation_Method Calculation_Method)
        {
            Calculation_Method_Items_List = Set_Calculation_Method_List_Items(Standard_Messages);

            Calculation_Method_ComboBox_List_SelectedItem = Set_Current_Calculation_Method_In_ComboBox(Calculation_Method);
        }
            /// <summary>
            /// Construct Numeral_System_List_Content_Factory for given resources.
            /// </summary>
            internal Numeral_System_List_Content_Factory(Numeral_System_List_Context _Numeral_System_List_Context, IStandard_Messages_Translate _Standard_Messages)
            {
                Standard_Messages = _Standard_Messages;

                Numeral_System_List_Context = _Numeral_System_List_Context;
            }
コード例 #30
0
        /// <summary>
        /// Constructs item for given Calculator_Mode.
        /// </summary>
        internal Calculator_Mode_List_Item(IStandard_Messages_Translate Standard_Messages, Calculator_Mode _Calculator_Mode)
        {
            Calculator_Mode = _Calculator_Mode;

            Calculator_Mode_Name = Standard_Messages.Translate(Calculator_Mode.ToString());
        }