public MasterPreViewModel(IMaster widget) { //Infra Structure _model = new MasterModel(widget, true); //IsImgConvertType = false; (_model as MasterModel).LoadAllChildrenWidgets(); }
protected void Page_Load(object sender, EventArgs e) { IMaster master = this.Master as IMaster; master.setHeaderBtnBack(false); master.setRefreshCountBtn(true); }
public VisualTable(string name, IMaster master) { this.Text = ""; this.Click += new EventHandler(VisualTable_Click); this.MouseDown += new MouseEventHandler(VisualTable_MouseDown); this.MouseUp += new MouseEventHandler(VisualTable_MouseUp); this.MouseMove += new MouseEventHandler(VisualTable_MouseMove); _masterUIControl = master; _lblName = new Label(); _lblName.Location = new Point(5, 10); _lblName.Click += new EventHandler(objName_Click); _txtName = new TextBox(); _txtName.Location = new Point(5, 15); _txtName.Width = this.Width - 20; _txtName.Visible = false; _txtName.KeyUp += new KeyEventHandler(txtName_KeyUp); _txtName.TextChanged += new EventHandler(_txtName_TextChanged); this.ObjectName = name; _tablenameAssist.KeyUp += new KeyEventHandler(tablenameAssist_KeyUp); _tablenameAssist.Click += new EventHandler(_tablenameAssist_Click); _tablenameAssist.Hide(); this.Controls.Add(_lblName); this.Controls.Add(_txtName); this._masterUIControl.getMasterUIControl().Controls.Add(_tablenameAssist); }
/// <summary> /// Initializes a new instance of the <see cref="CommonController" /> class. /// </summary> /// <param name="_iMaster">The i common.</param> /// <param name="_iProductCategoryType">Type of the i product category.</param> /// <param name="_iUser">The i user.</param> /// <param name="_iSize">Size of the i.</param> public MasterController(IMaster _iMaster, IProductCategoryType _iProductCategoryType, IUser _iUser, ISize _iSize) { iMaster = _iMaster; iProductCategoryType = _iProductCategoryType; iUser = _iUser; iSize = _iSize; }
/// <summary> /// /// </summary> /// <param name="master"></param> /// <param name="registers"></param> /// <param name="configuration"></param> /// <param name="logger"></param> public ModbusBridge(IMaster master, RegistersConfiguration registers, ConnectorConfiguration configuration, ILogger logger) { _logger = logger; _master = master; _registers = registers; _configuration = configuration; }
/// <summary> /// Gets the master data of. /// </summary> /// <param name="context">The context.</param> /// <param name="web">The web.</param> /// <param name="master">The master.</param> /// <returns> /// master object /// </returns> private IMaster GetMasterDataOf(ClientContext context, Web web, IMaster master) { dynamic objMaster = Convert.ChangeType(master, master.GetType()); string listName = Convert.ToString(((PropertyInfo)objMaster.GetType().GetProperty("ListName")).GetValue(objMaster)); objMaster = GlobalCachingProvider.Instance.GetItem(listName, false) as IMaster; if (objMaster == null) { objMaster = Convert.ChangeType(master, master.GetType()); string scope = Convert.ToString(((PropertyInfo)objMaster.GetType().GetProperty("Scope")).GetValue(objMaster)); Type itemType = ((PropertyInfo)objMaster.GetType().GetProperty("ItemType")).GetValue(objMaster); PropertyInfo[] properties = itemType.GetProperties(); string viewFields = this.GetViewFields(properties); if (scope.Equals(ListScope.GLOBAL)) { string siteURL = GetSiteURL(SiteURLs.ROOTSITEURL); //this.GetConfigVariable(SiteURLs.ROOTSITEURL); context = this.CreateClientContext(siteURL); web = this.CreateWeb(context); } List spList = web.Lists.GetByTitle(listName); CamlQuery qry = new CamlQuery(); qry.ViewXml = @"<View><Query></Query>" + viewFields + "</View>"; ListItemCollection items = spList.GetItems(CamlQuery.CreateAllItemsQuery()); context.Load(items); context.ExecuteQuery(); objMaster = this.AssignPropertyValues(objMaster, context, web, items, itemType); GlobalCachingProvider.Instance.AddItem(listName, objMaster); } return(objMaster); }
public MasterModel(IMaster master) { _master = master; IDocumentService doc = ServiceLocator.Current.GetInstance <IDocumentService>(); _document = doc.Document; _style = master.MasterStyle; }
private static SerialMaster CreateSerialMaster(IMaster wdg) { if (wdg == null) { return(null); } return(new SerialMaster(wdg)); }
public NestedInterfacesTest() { _store = new DictionaryConfigStore(); _config = new ConfigurationBuilder <IMaster>() .UseConfigStore(_store) .Build(); }
public JsMasterStyle(IMaster master, IMasterStyle masterStyle, IPageView pageView, bool bIsSetMD5, Guid AdaptiviewID) { _master = master; _masterStyle = masterStyle; _pageView = pageView; IsSetMD5 = bIsSetMD5; _childPageView = _master.MasterPage.PageViews[AdaptiviewID]; }
private void btnHeader_Click(object sender, RoutedEventArgs e) { gdChild.Children.Clear(); AccountsUC ac = new AccountsUC(); _imaster = ac; gdChild.Children.Add(ac); }
public ClientTCP(string ip, int port, IMaster callback) { _endpoint = new IPEndPoint(IPAddress.Parse(ip), port); _callback = callback; _disposed = false; _synlock = new object(); _sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); }
private void btnRegistration_Click(object sender, RoutedEventArgs e) { gdChild.Children.Clear(); RegUI rg = new RegUI(); _imaster = rg; gdChild.Children.Add(rg); }
private void btnVehicle_Click(object sender, RoutedEventArgs e) { gdChild.Children.Clear(); Vehicle v = new Vehicle(); _imaster = v; gdChild.Children.Add(v); }
public static bool OpenHelp(this IMaster proc) { if (proc == null) { return(false); } Process.Start(proc.HelpUrl); return(true); }
/// <summary> /// /// </summary> /// <param name="baseUiControl">visualTable 執行的環境</param> /// <param name="master">資料提供者</param> public VisualTableManager(Control baseUiControl, IMaster master) { _uiControl = baseUiControl; _master = master; VisualTable box = makeVisualTable(master); box.Location = new Point(30, 30); }
public MasterForm(IMaster master, IMeasurementCache cache, String alias) { InitializeComponent(); this.master = master; this.cache = cache; this.Text = String.Format("DNP3 Master ({0})", alias); }
protected void Button1_Click(object sender, EventArgs e) { //Add items to session //.... //Now refresh the updatepanel on the masterpage IMaster masterPage = Master as IMaster; masterPage.RefreshPanel(); }
protected void Page_Load(object sender, EventArgs e) { IMaster master = this.Master as IMaster; master.setHeaderBtnVisible(false); //master.setRefreshFavouriteBtn(true); BindData(); }
public MasterNode(MeasurementCache cache, IMaster master, ISimulatorNodeCallbacks callbacks, string alias) { this.cache = cache; this.master = master; this.callbacks = callbacks; this.alias = alias; this.callbacks.ChangeImage(IconIndex.Master); this.openAction = new NodeAction("Open", () => OpenForm()); }
private VisualTable makeVisualTable(IMaster master) { Control baseUiControl = master.getMasterUIControl(); VisualTable box = new VisualTable("unknown", master); baseUiControl.Controls.Add(box); baseUiControl.MouseUp += new MouseEventHandler(baseUiControl_MouseUp); return(box); }
/// <summary> /// Initializes a new instance of <see cref="Connector"/> /// </summary> /// <param name="registers">The <see cref="RegistersConfiguration">configured registers</see></param> /// <param name="configuration"><see cref="ConnectorConfiguration">Configuration</see></param> /// <param name="master">The <see cref="IMaster"/></param> /// <param name="logger"><see cref="ILogger"/> for logging</param> public Connector( RegistersConfiguration registers, ConnectorConfiguration configuration, IMaster master, ILogger logger) { _registers = registers; _configuration = configuration; _logger = logger; _master = master; }
public static IWriterStrategy GetStrategy(IMaster thing) { switch (thing) { case IA ia: return(new WriterA(ia)); case IB ib: return(new WriterB(ib)); } throw new Exception("Strategy not found!"); }
public void MultipleBindingTest() { container.AutoBinding(Profiles.PROFILE_A); Master selfBindingInstance = container.Get <Master>(); IMaster interface1BindingInstance = container.Get <IMaster>(); IMaster2 interface2BindingInstance = container.Get <IMaster2>(); Assert.IsInstanceOfType(selfBindingInstance, typeof(Master)); Assert.IsInstanceOfType(interface1BindingInstance, typeof(Master)); Assert.IsInstanceOfType(interface2BindingInstance, typeof(Master)); }
/// <summary> /// Creates Tcp channel, and gets a reference to master server /// </summary> /// <returns> a predicate confirming the sucess of the operations</returns> public static bool Init() { Logger.Log(new String[] { "Library", "init", "\r\n" }); IDictionary props = new Hashtable(); props["retryCount"] = 5; props["timeout"] = 30000; // in milliseconds channel = new TcpChannel(props, null, null); ChannelServices.RegisterChannel(channel, false); masterServer = (IMaster)Activator.GetObject(typeof(IMaster), "tcp://localhost:8086/MasterServer"); return(true); }
protected void Page_Load(object sender, EventArgs e) { IMaster master = this.Master as IMaster; master.setHeaderBtnVisible(false); //master.setRefreshNoticeBtn(true); if (!IsPostBack) { BindData(); } }
public static void RunInterfaces2() { Slave slave = new Slave(); // slave.P slave.III(); IMaster master = slave; master.Power(); //master.Freedom(); ((IMaster)slave).Freedom(); }
public MasterForm(IMaster master, IMeasurementCache cache, String alias) { InitializeComponent(); this.master = master; this.cache = cache; this.Text = String.Format("DNP3 Master ({0})", alias); this.masterScanControl1.Master = master; this.comboBoxFunctionCode.DataSource = Enum.GetValues(typeof(FunctionCode)); }
public void ConnectToChannel(string clientName) { _clientName = clientName; string address = Constants.EndPointAddress; NetNamedPipeBinding binding = new NetNamedPipeBinding(NetNamedPipeSecurityMode.None); EndpointAddress ep = new EndpointAddress(address); _connection = ChannelFactory <IMaster> .CreateChannel(binding, ep); Console.WriteLine("Client Connected"); }
public override void Run() { var masterStack = new MasterStackConfig(); masterStack.link.localAddr = 1; masterStack.link.remoteAddr = 10; master = GetMaster(masterStack); var integrityPoll = master.AddClassScan(ClassField.AllEventClasses, TimeSpan.FromMilliseconds(500), TaskConfig.Default); master.Enable(); }
public void setMaster(IMaster m) { this.master = m; }
public MasterService(String masterUrl) { masterEndPoint = masterUrl; master = (IMaster)Activator.GetObject(typeof(IMaster), masterEndPoint); }
// TODO: poor implementation //public List<IndexedValue<Analog>> NewAnalogs = new List<IndexedValue<Analog>>(); //public List<IndexedValue<Binary>> NewBinaries = new List<IndexedValue<Binary>>(); public OutstationWrapper(Outstation Model, IMaster Master) { this.Model = Model; this.Master = Master; }
public DataServer(IMaster master, String serverUrl) { this.serverUrl = serverUrl; this.masterServer = master; }
public static bool Init() { TcpChannel channel = new TcpChannel(); ChannelServices.RegisterChannel(channel, true); PadiDstm.master = (IMaster)Activator.GetObject(typeof(IMaster), Constants.MASTER_SERVER_URL); PadiDstm.inited = true; return true; }
public LookupService(MasterService masterEndpointService) { masterService = masterEndpointService; master = masterService.Master; }
public Slave(IMaster master) { chief = master; }