/// <summary>
        /// Подпрограмма инициализации элемента TabControl
        /// </summary>
        private void CreateTestForm()
        {
            // Заголовок программы
            Title = AssemblyClass.get_description_file_exe();
            // Заголовок меню
            //var menu_name = ( MenuItem ) Menu.Items[ 0 ];
            //menu_name.Header = AssemblyClass.get_product_file_exe();
            // Кнопка запуска полного теста
            //ButtonStart.Content = $"Тест {App.MyGmainTest.ConfigProgram.NameDevice}";
            // Настройка иконки
            set_icon(App.TaskManager.ConfigProgram.ImageUri);
            // Настройка рисунка
            set_image(App.TaskManager.ConfigProgram.ImageUri);
            // Создание страниц TabControl первого уровня
            create_tab_l1();
            // Добавление пункта меню
            var xml     = new XmlClass();
            var address = xml.Read(XmlClass.NameLogFiles, "e-mail");

            if (string.IsNullOrWhiteSpace(address))
            {
                return;
            }
            // Создание меню для парсинга elf-файла
            var email_menu_item = new MenuItem {
                Header = "Отправить лог-файл по email"
            };

            email_menu_item.Click += emailMenuItem_Click;
            MenuItemFile.Items.Add(email_menu_item);
        }
        static void Main(string[] args)
        {
            AssemblyClass ac = new AssemblyClass();
            DerivedClass  dc = new DerivedClass();

            AssemblyClass.publicClass.publicClassFunction();
        }
예제 #3
0
    static void Main()
    {
        // This will be OK
        AssemblyClass test = new AssemblyClass();

        // This will give us a CS0117 error
        AssemblyClass.x = 222;
    }
        //------------------------------------------------------------------------------
        void UpdateUI()
        {
            InvokeOnMainThread(() =>
            {
                AssemblyClass.LoadSettings();

                m_Label.Text        = AssemblyClass.GetStringValue();
                m_CustomObject.Text = AssemblyClass.GetCustomObjectValue();
            });
        }
예제 #5
0
        public static void Main()
        {
            AssemblyClass assemblyClass = new AssemblyClass();

            Console.WriteLine(assemblyClass.Sum(1, 2));
            Console.WriteLine(assemblyClass.Dif(3, 2));
            Console.WriteLine(assemblyClass.Mul(1, 2));
            Console.WriteLine(assemblyClass.Div(8, 4));
            Console.ReadLine();
        }
예제 #6
0
 public bool Compare(UserDataType obj)
 {
     if (obj == null)
     {
         throw new ArgumentNullException("obj");
     }
     if (Scale != obj.Scale)
     {
         return(false);
     }
     if (Precision != obj.Precision)
     {
         return(false);
     }
     if (AllowNull != obj.AllowNull)
     {
         return(false);
     }
     if (Size != obj.Size)
     {
         return(false);
     }
     if (!Type.Equals(obj.Type))
     {
         return(false);
     }
     if (IsAssembly != obj.IsAssembly)
     {
         return(false);
     }
     if (!AssemblyClass.Equals(obj.AssemblyClass))
     {
         return(false);
     }
     if (!AssemblyName.Equals(obj.AssemblyName))
     {
         return(false);
     }
     if (!CompareDefault(this, obj))
     {
         return(false);
     }
     if (!CompareRule(this, obj))
     {
         return(false);
     }
     return(true);
 }
예제 #7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Blender"/> class.
        /// </summary>
        /// <param name="log">The log.</param>
        /// <param name="parser">The parser.</param>
        /// <param name="subscribers">The subscribers.</param>
        /// <exception cref="System.ArgumentNullException">
        /// Throws when "parser" or "log" are null.
        /// </exception>
        public Blender(LogFile log, AssemblyClass parser, IEnumerable <AssemblyClass> subscribers)
        {
            BaseParser       = Loader.LoadParser(parser.AssemblyName, parser.ClassName, log);
            this.Subscribers = Loader.LoadListeners(subscribers);
            this.LogContent  = Loader.LoadLogContent(log.Location);
            if (BaseParser == null)
            {
                throw new ArgumentNullException("parser");
            }

            if (this.LogContent == null)
            {
                throw new ArgumentNullException("log");
            }

            this.SubscribeListeners();
        }
예제 #8
0
 public WindowInfo()
 {
     InitializeComponent();
     // Настройка изображений
     //var path = App.MyGmainTest.ConfigProgram.ImageUri;
     Icon          = new IconClass().get_icon();
     Image1.Source = new IconClass().get_image();
     // Задание текстовой информации
     LabelTitle.Text       = AssemblyClass.get_title_file_exe();
     LabelDescription.Text = AssemblyClass.get_description_file_exe();
     LabelCompany.Text     = AssemblyClass.get_company_file_exe();
     LabelName.Text        = AssemblyClass.get_product_file_exe();
     LabelCopyright.Text   = AssemblyClass.get_сopyright_file_exe();
     LabelVersion.Text     = AssemblyClass.get_version_exe();
     LabelGuid.Text        = AssemblyClass.get_guid_file_exe();
     LabelData.Text        = $"{AssemblyClass.get_data_exe():dd MMMM yyyy HH:mm:ss}";
     LabelDeveloper.Text   = "Волков В.А., отдел 312";
     LabelVersionNet.Text  = Environment.Version.ToString();
     LabelVersionOs.Text   = $"{Environment.OSVersion} ( {Environment.OSVersion.Version} )";
     LabelPathExe.Text     = Environment.CurrentDirectory;
 }
        //------------------------------------------------------------------------------
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            Window = new UIWindow(UIScreen.MainScreen.Bounds);

            AssemblyClass.LoadSettings();

            var rootElement         = new RootElement("Advexp.Settings Standard-iOS sample");
            var jsonSettingsElement = new MultilineElement(AssemblyClass.GetJSON());

            var boolElement = new BooleanElement("bool value",
                                                 AssemblyClass.BoolValue);

            boolElement.ValueChanged += (object sender, System.EventArgs e) =>
            {
                AssemblyClass.BoolValue = boolElement.Value;

                UpdateJSON(rootElement, jsonSettingsElement);
                AssemblyClass.SaveSettings();
            };

            var stringElement = new EntryElement("string value", "string value",
                                                 AssemblyClass.StringValue);

            stringElement.AutocorrectionType = UITextAutocorrectionType.No;
            stringElement.Changed           += (object sender, EventArgs e) =>
            {
                AssemblyClass.StringValue = stringElement.Value;

                UpdateJSON(rootElement, jsonSettingsElement);
                AssemblyClass.SaveSettings();
            };

            var enumElement = new RootElement("enum value", new RadioGroup((int)AssemblyClass.EnumValue));

            Action <RadioElementEx, EventArgs> enumDelegate = (sender, e) =>
            {
                AssemblyClass.EnumValue = (SampleEnum)enumElement.RadioSelected;

                UpdateJSON(rootElement, jsonSettingsElement);
                AssemblyClass.SaveSettings();
            };

            var enumsSection = new RootElement("enum value", new RadioGroup((int)AssemblyClass.EnumValue))
            {
                new Section()
                {
                    new RadioElementEx("Zero", enumDelegate),
                    new RadioElementEx("One", enumDelegate),
                    new RadioElementEx("Two", enumDelegate),
                    new RadioElementEx("Three", enumDelegate),
                    new RadioElementEx("Four", enumDelegate),
                    new RadioElementEx("Five", enumDelegate),
                    new RadioElementEx("Six", enumDelegate),
                    new RadioElementEx("Seven", enumDelegate),
                    new RadioElementEx("Eight", enumDelegate),
                    new RadioElementEx("Nine", enumDelegate),
                    new RadioElementEx("Ten", enumDelegate),
                }
            };

            enumElement.Add(enumsSection);

            var rootSection = new Section()
            {
                boolElement,
                stringElement,
                enumElement,
                jsonSettingsElement,
            };

            rootElement.Add(rootSection);

            var rootVC = new DialogViewController(rootElement);
            var nav    = new UINavigationController(rootVC);

            Window.RootViewController = nav;
            Window.MakeKeyAndVisible();

            return(true);
        }
 //------------------------------------------------------------------------------
 void UpdateJSON(RootElement rootElement, MultilineElement element)
 {
     element.Caption = AssemblyClass.GetJSON();
     rootElement.Reload(element, UITableViewRowAnimation.Automatic);
 }
        //------------------------------------------------------------------------------
        partial void UIButton44Ua86gi_TouchUpInside(UIButton sender)
        {
            m_FetchStatus.Text = "Fetching...";

            AssemblyClass.Fetch();
        }
 //------------------------------------------------------------------------------
 protected ViewController(IntPtr handle) : base(handle)
 {
     AssemblyClass.SetCompletionHandler(CompletionHandler);
 }