public WeatherModel(ForecastIO.ForecastIOResponse forecast) { this.currentWeather = new Current(forecast); this.day0 = new Daily(forecast, 0); this.day1 = new Daily(forecast, 1); this.day2 = new Daily(forecast, 2); }
public AdminForm() { InitializeComponent(); try { current = Program.StartForm.current; if (current == null) { Functions.CloseApplication(); return; } Splash.Message("Настройка источника данных..."); current.Parameters.Add("AdminConnectionString", 0, "User id=qmmoscow;password=qmmoscow;Data Source=limsmsk;Max Pool Size=30;Connection Lifetime=1200"); AdminConnection.ConnectionString = current.Parameters["AdminConnectionString"].StringValue; //AdminConnection.ConnectionString = "User id=qmmoscow;password=qmmoscow;Data Source=limsmsk;Max Pool Size=30;Connection Lifetime=1200"; AdminConnection.Open(); UpdateData(); WindowState = FormWindowState.Maximized; } finally { Splash.Close(); } }
public override void peerConnected(string peerId, PeerAccessLevel peerAccessLevel, ObjectPrx peerProxy, Current current) { Trace.TraceError("TerkUserServant.peerConnected()" + current.ToString()); Trace.TraceError("The peer [" + peerId + "|" + peerAccessLevel + "|" + Util.identityToString(peerProxy.ice_getIdentity()) + "] just connected to me."); helper.peerConnected(peerId, peerAccessLevel, peerProxy, current); }
public override VSSoldierPrx instantiateSoldier(Current current__) { Identity myId = VSNetworkManager.communicator().stringToIdentity(System.Guid.NewGuid().ToString()); VSSoldierI soldierI = new VSSoldierI(); VSNetworkManager.Adapter.add(soldierI, myId); return VSSoldierPrxHelper.checkedCast(VSNetworkManager.Adapter.createProxy(myId)); }
public override void getDateTimeValue(out int year, out short month, out short day, out short hour, out short minute, out short second, Current __current) { year = this.year; month = this.month; day = this.day; hour = 0; minute = 0; second = 0; }
// Slice name() operation. public override string name(Current c) { lock(this) { if(_destroyed) { throw new ObjectNotExistException(); } return _name; } }
public override string[] read(Current c) { lock(this) { if(_destroyed) { throw new ObjectNotExistException(); } return _lines; } }
public override void write(string[] text, Current c) { lock(this) { if(_destroyed) { throw new ObjectNotExistException(); } _lines = new string[text.Length]; text.CopyTo((string[])_lines, 0); } }
/// <summary> /// Method createBoxModule /// </summary> /// <returns>A Ferda.Modules.BoxModulePrx</returns> /// <param name="__current">An Ice.Current</param> public override BoxModulePrx createBoxModule(Current __current) { if (_destroy) { throw new Ice.ObjectNotExistException(); } Ice.Identity boxModuleIdentity = Ice.Util.stringToIdentity(Ice.Util.generateUUID()); PropertyBoxModuleI boxModule = new PropertyBoxModuleI(myProxy, this.propertyClassIceId, this.propertyFunctionsIceIds, __current.adapter, boxModuleIdentity, valueFromPrx, defaultValue); BoxModulePrx boxModulePrx = boxModule.MyProxy; string boxIdentity = Ice.Util.identityToString(boxModulePrx.ice_getIdentity()); this.boxModules[boxIdentity] = boxModule; return boxModulePrx; }
/// <summary> /// Method createBoxModuleFactory /// </summary> /// <returns>A Ferda.Modules.BoxModuleFactoryPrx</returns> /// <param name="localePrefs">A string[]</param> /// <param name="manager">A Ferda.ModulesManager.ManagersEnginePrx</param> /// <param name="__current">An Ice.Current</param> public override BoxModuleFactoryPrx createBoxModuleFactory(String[] localePrefs, ManagersEnginePrx manager, Current __current) { PropertyBoxModuleFactoryI boxModuleFactory = new PropertyBoxModuleFactoryI(propertyClassIceId, propertyFunctionsIceIds, myProxy, localePrefs, defaultValue, valueFromPrx, __current.adapter, settingModuleIdentifier); this.reaper.Add(boxModuleFactory.MyProxy, boxModuleFactory); return boxModuleFactory.MyProxy; }
public override void destroy(Current c) { lock(this) { if(_destroyed) { throw new ObjectNotExistException(); } c.adapter.remove(id()); _destroyed = true; } _parent.removeEntry(_name); }
public CertTankForm() { InitializeComponent(); StatusSplash.Create(MainStatusStrip); StatusSplash.Message("�����������..."); current = Program.StartForm.current; if (current == null) { Functions.CloseApplication(); return; } StatusSplash.Message("��������� ��������� ������..."); current.Parameters.Add("ConnectionString", 0, "User id=qmmoscow;password=qmmoscow;Data Source=msk-lims-01.corp.tnk-bp.ru;SID=limsmsk;Direct=true;Max Pool Size=30;Connection Lifetime=1200"); DataConnection.ConnectionString = current.Parameters["ConnectionString"].StringValue; DataConnection.Open(); StatusSplash.Message("������..."); // ������� FlexCell FM = new FlexCellManager(Book); FM.InitBook(1, 1, "Arial", 8, true); FM.EnableCalculateStatistical(StatusLabel); // ������������� ���� Date1.Value = Functions.FirstDateInMonth(DateTime.Now.AddDays(-3)); Date1.MaxDate = DateTime.Now; Date2.Value = Functions.LastDateInMonth(DateTime.Now.AddDays(-3)); Date2.MaxDate = Date2.Value; this.WindowState = FormWindowState.Maximized; StatusSplash.Message("��������� ������ �����������..."); UpdatePlants(); // ��������� ������ ������ ������� StatusSplash.Message("���������� �������� ������..."); // ��������� �������� ��������, ������� ������ �� ������� �������� � ��� ��������� �� ���������� � // �����������, �� ��������� �������� "�������" �������� FL = new FilterList(current); FL.Add(new Filter(null, Date1, null)); FL.Add(new Filter(null, Date2, null)); FL.Add(PlantCombo, UpdateCertTankPlants); FL.Add(ControlTypeCombo, UpdateCertTankControlTypes); FL.Add(ProductCombo, UpdateCertTankProducts); FL.Start(); StatusSplash.Close(); }
// Slice createFile() operation. public override FilePrx createFile(string name, Current c) { lock(this) { if(_destroyed) { throw new ObjectNotExistException(); } if(name.Length == 0 || _contents.ContainsKey(name)) { throw new NameInUse(name); } var f = new FileI(name, this); var node = c.adapter.add(f, f.id()); _contents.Add(name, f); return FilePrxHelper.uncheckedCast(node); } }
// Slice createDirectory() operation. public override DirectoryPrx createDirectory(string name, Current c) { lock(this) { if(_destroyed) { throw new ObjectNotExistException(); } if(name.Length == 0 || _contents.ContainsKey(name)) { throw new NameInUse(name); } var d = new DirectoryI(name, this); var node = c.adapter.add(d, d.id()); _contents.Add(name, d); return DirectoryPrxHelper.uncheckedCast(node); } }
// Slice find() operation. public override NodeDesc find(string name, Current c) { lock(this) { if(_destroyed) { throw new ObjectNotExistException(); } NodeI p = (NodeI) _contents[name]; if(p == null) { throw new NoSuchName(name); } NodeDesc d = new NodeDesc(); d.name = name; d.type = p is FileI ? NodeType.FileType : NodeType.DirType; d.proxy = NodePrxHelper.uncheckedCast(c.adapter.createProxy(p.id())); return d; } }
public SpecificationForm() { InitializeComponent(); try { current = Program.StartForm.current; if (current == null) { Functions.CloseApplication(); return; } FM = new FlexCellManager(Book); FM.InitBook(1, 1, "Tahoma", 8, true); StatusSplash.Create(MainStatusStrip); StatusSplash.Message("Настройка источника данных..."); current.Parameters.Add("ConnectionString", 0, "User id=qmmoscow;password=qmmoscow;Data Source=msk-lims-01.corp.tnk-bp.ru;SID=limsmsk;Direct=true;Max Pool Size=30;Connection Lifetime=1200"); DataConnection.ConnectionString = current.Parameters["ConnectionString"].StringValue; DataConnection.Open(); // фильтры StatusSplash.Message("Обновление фильтров..."); FL = new FilterList(current); FL.Add(PlantsCheck, null); FL.Add(PlantsCombo, UpdatePlants); FL.Add(UNCCheck, null); FL.Add(UNCCombo, UpdateUNCProducts); FL.Add(ProductsCheck, null); FL.Add(ProductsCombo, UpdateProducts); FL.Start(); IntegralCheck_CheckedChanged(this, new EventArgs()); } finally { StatusSplash.Close(); } }
// Slice list() operation. public override NodeDesc[] list(Current c) { lock(this) { if(_destroyed) { throw new ObjectNotExistException(); } NodeDesc[] ret = new NodeDesc[_contents.Count]; int i = 0; foreach(DictionaryEntry e in _contents) { NodeI p = (NodeI)e.Value; ret[i] = new NodeDesc(); ret[i].name = (string)e.Key; ret[i].type = p is FileI ? NodeType.FileType : NodeType.DirType; ret[i].proxy = NodePrxHelper.uncheckedCast(c.adapter.createProxy(p.id())); ++i; } return ret; } }
/// <summary> /// Method getdateValue /// </summary> /// <param name="year">A short</param> /// <param name="month">A short</param> /// <param name="day">A short</param> /// <param name="__current">An Ice.Current</param> public override void getTimeValue(out short hour, out short minute, out short second, Current __current) { hour = this.hour; minute = this.minute; second = this.second; }
public override String getStringValue(Current __current) { TimeSpan timeSpan = new TimeSpan(); this.TryGetTimeSpan(out timeSpan); return timeSpan.ToString(); }
public override DispatchStatus dispatch__(IceInternal.Incoming inS__, Current current) { byte[] inEncaps = inS__.readParamEncaps(); AMD_Object_ice_invoke cb = new _AMD_Object_ice_invoke(inS__); try { ice_invoke_async(cb, inEncaps, current); } catch(System.Exception ex) { cb.ice_exception(ex); } return DispatchStatus.DispatchAsync; }
public abstract void ice_invoke_async(AMD_Object_ice_invoke cb, byte[] inEncaps, Current current);
public override DispatchStatus dispatch__(IceInternal.Incoming inS__, Current current) { byte[] inEncaps = inS__.readParamEncaps(); byte[] outEncaps; bool ok = ice_invoke(inEncaps, out outEncaps, current); inS__.writeParamEncaps__(outEncaps, ok); if(ok) { return DispatchStatus.DispatchOK; } else { return DispatchStatus.DispatchUserException; } }
/// <summary> /// Dispatch an incoming request. /// </summary> /// <param name="inParams">The encoded in-parameters for the operation.</param> /// <param name="outParams">The encoded out-paramaters and return value /// for the operation. The return value follows any out-parameters.</param> /// <param name="current">The Current object to pass to the operation.</param> /// <returns>If the operation completed successfully, the return value /// is true. If the operation raises a user exception, /// the return value is false; in this case, outParams /// must contain the encoded user exception. If the operation raises an /// Ice run-time exception, it must throw it directly.</returns> public abstract bool ice_invoke(byte[] inParams, out byte[] outParams, Current current);
public virtual DispatchStatus dispatch__(IceInternal.Incoming inc, Current current) { int pos = System.Array.BinarySearch(all__, current.operation); if(pos < 0) { throw new Ice.OperationNotExistException(current.id, current.facet, current.operation); } switch(pos) { case 0: { return ice_id___(this, inc, current); } case 1: { return ice_ids___(this, inc, current); } case 2: { return ice_isA___(this, inc, current); } case 3: { return ice_ping___(this, inc, current); } } Debug.Assert(false); throw new Ice.OperationNotExistException(current.id, current.facet, current.operation); }
public static DispatchStatus ice_id___(Ice.Object __obj, IceInternal.Incoming inS__, Current __current) { inS__.readEmptyParams(); string __ret = __obj.ice_id(__current); IceInternal.BasicStream os__ = inS__.startWriteParams__(FormatType.DefaultFormat); os__.writeString(__ret); inS__.endWriteParams__(true); return DispatchStatus.DispatchOK; }
/// <summary> /// Returns the Slice type ID of the most-derived interface supported by this object. /// </summary> /// <param name="current">The Current object for the invocation.</param> /// <returns>The return value is always ::Ice::Object.</returns> public virtual string ice_id(Current current) { return ids__[0]; }
/// <summary> /// Returns the Slice type IDs of the interfaces supported by this object. /// </summary> /// <param name="current">The Current object for the invocation.</param> /// <returns>An array whose only element is ::Ice::Object.</returns> public virtual string[] ice_ids(Current current) { return ids__; }
public static DispatchStatus ice_ping___(Ice.Object __obj, IceInternal.Incoming inS__, Current __current) { inS__.readEmptyParams(); __obj.ice_ping(__current); inS__.writeEmptyParams__(); return DispatchStatus.DispatchOK; }
/// <summary> /// Tests whether this object can be reached. /// <param name="current">The Current object for the invocation.</param> /// </summary> public virtual void ice_ping(Current current) { // Nothing to do. }
public static DispatchStatus ice_isA___(Ice.Object __obj, IceInternal.Incoming inS__, Current __current) { IceInternal.BasicStream is__ = inS__.startReadParams(); string __id = is__.readString(); inS__.endReadParams(); bool __ret = __obj.ice_isA(__id, __current); IceInternal.BasicStream os__ = inS__.startWriteParams__(FormatType.DefaultFormat); os__.writeBool(__ret); inS__.endWriteParams__(true); return DispatchStatus.DispatchOK; }