static void Main(string[] args) { int QueueCapacity = 10; int StorageCapacity = 15; HAL hal01 = new HAL(0.5, 7, "hal01", new Coordinates(0, 0), new Coordinates(5, 5)); R2D2 r2d201 = new R2D2(1.5, 5.5, "r2d201", new Coordinates(0, 0), new Coordinates(5, 5)); T_800 t80001 = new T_800(3, 10, "t80001", new Coordinates(0, 0), new Coordinates(5, 5)); Wall_E walle01 = new Wall_E(2, 4, "walle01", new Coordinates(0, 0), new Coordinates(5, 5)); UnitFactory unitFactory = new UnitFactory(QueueCapacity, StorageCapacity); unitFactory.AddWorkableUnitToQueue(hal01.GetType(), hal01.Name, hal01.parkingPos, hal01.workingPos); unitFactory.AddWorkableUnitToQueue(r2d201.GetType(), r2d201.Name, r2d201.parkingPos, r2d201.workingPos); unitFactory.AddWorkableUnitToQueue(t80001.GetType(), t80001.Name, hal01.parkingPos, t80001.workingPos); unitFactory.AddWorkableUnitToQueue(walle01.GetType(), walle01.Name, walle01.parkingPos, walle01.workingPos); }
static void Main() { var r1 = new Regex1(); var m1 = r1.Match("7"); var m2 = r1.Match("1"); var m3 = r1.Match("sfjslkfjsklf", 3); var m4 = r1.Match("áíščřáí ěšrui564564564šš", 4, 8); var ms1 = r1.Matches("aaaa"); var ms2 = r1.Matches("aaaa", 0); var r2 = new R2D2(); var rm1 = r2.Match("01/1/1990"); Console.WriteLine($"{rm1.Year}-{rm1.Month}-{rm1.Day}"); var rm2 = r2.Match("a01/1/1990", 1); var rm3 = r2.Match("a01/1/1990b", 1, 9); var rms1 = r2.Matches("01/1/199006/06/8741"); var rms2 = r2.Matches("a01/1/1990ř06/06/8741Ň", 1); Console.WriteLine(rms2.Skip(1).First().Year); }
public Ice.AsyncResult begin_updateBotPosition(R2D2.BotPosition enc, R2D2.BotPosition imu, Ice.AsyncCallback cb__, object cookie__) { return begin_updateBotPosition(enc, imu, null, false, cb__, cookie__); }
public Ice.AsyncResult<R2D2.Callback_BotToBase_updateBotPosition> begin_updateBotPosition(R2D2.BotPosition enc, R2D2.BotPosition imu) { return begin_updateBotPosition(enc, imu, null, false, null, null); }
private void updateBotPosition(R2D2.BotPosition enc, R2D2.BotPosition imu, _System.Collections.Generic.Dictionary<string, string> context__, bool explicitContext__) { if(explicitContext__ && context__ == null) { context__ = emptyContext_; } Ice.Instrumentation.InvocationObserver observer__ = IceInternal.ObserverHelper.get(this, __updateBotPosition_name, context__); int cnt__ = 0; try { while(true) { Ice.ObjectDel_ delBase__ = null; try { delBase__ = getDelegate__(false); BotToBaseDel_ del__ = (BotToBaseDel_)delBase__; del__.updateBotPosition(enc, imu, context__, observer__); return; } catch(IceInternal.LocalExceptionWrapper ex__) { handleExceptionWrapper__(delBase__, ex__, observer__); } catch(Ice.LocalException ex__) { handleException__(delBase__, ex__, true, ref cnt__, observer__); } } } finally { if(observer__ != null) { observer__.detach(); } } }
public void updateBotPosition(R2D2.BotPosition enc, R2D2.BotPosition imu) { updateBotPosition(enc, imu, null, false); }
public abstract void setFlapState(R2D2.FlapState state, Ice.Current current__);
public abstract void playSound(R2D2.Sound snd, Ice.Current current__);
public abstract void updateBotPosition(R2D2.BotPosition enc, R2D2.BotPosition imu, Ice.Current current__);
public Ice.AsyncResult<R2D2.Callback_BaseToBot_setFlapState> begin_setFlapState(R2D2.FlapState state) { return begin_setFlapState(state, null, false, null, null); }
private void rotateHead_completed__(R2D2.Callback_BaseToBot_rotateHead cb__) { if(cb__ != null) { cb__(); } }
private void playSound_completed__(R2D2.Callback_BaseToBot_playSound cb__) { if(cb__ != null) { cb__(); } }
public Ice.AsyncResult begin_playSound(R2D2.Sound snd, _System.Collections.Generic.Dictionary<string, string> ctx__, Ice.AsyncCallback cb__, object cookie__) { return begin_playSound(snd, ctx__, true, cb__, cookie__); }
public Ice.AsyncResult begin_playSound(R2D2.Sound snd, Ice.AsyncCallback cb__, object cookie__) { return begin_playSound(snd, null, false, cb__, cookie__); }
private Ice.AsyncResult<R2D2.Callback_BotToBase_updateBotPosition> begin_updateBotPosition(R2D2.BotPosition enc, R2D2.BotPosition imu, _System.Collections.Generic.Dictionary<string, string> ctx__, bool explicitContext__, Ice.AsyncCallback cb__, object cookie__) { IceInternal.OnewayOutgoingAsync<R2D2.Callback_BotToBase_updateBotPosition> result__ = new IceInternal.OnewayOutgoingAsync<R2D2.Callback_BotToBase_updateBotPosition>(this, __updateBotPosition_name, updateBotPosition_completed__, cookie__); if(cb__ != null) { result__.whenCompletedWithAsyncCallback(cb__); } try { result__.prepare__(__updateBotPosition_name, Ice.OperationMode.Normal, ctx__, explicitContext__); IceInternal.BasicStream os__ = result__.startWriteParams__(Ice.FormatType.DefaultFormat); enc.write__(os__); imu.write__(os__); result__.endWriteParams__(); result__.send__(true); } catch(Ice.LocalException ex__) { result__.exceptionAsync__(ex__); } return result__; }
public override void updateLocalElements(object sender, EventArgs e) { // SET FLASH VFlash = dataStorage.getData("AGC_VFLSH") == "SET" ? true : false; NFlash = dataStorage.getData("AGC_NFLSH") == "SET" ? true : false; // PROGRAM MD1 = dataStorage.getData("AGC_MD1"); MD2 = dataStorage.getData("AGC_MD2"); screenSegDisps[5].setValue(MD1.ToString() + MD2.ToString()); // VERB VD1 = dataStorage.getData("AGC_VD1"); VD2 = dataStorage.getData("AGC_VD2"); if (VFlash) { if (VFC < 1) { screenSegDisps[3].setValue(VD1.ToString() + VD2.ToString()); VFC++; } else if (VFC < 2) { screenSegDisps[3].setValue(""); VFC = 0; } } else { screenSegDisps[3].setValue(VD1.ToString() + VD2.ToString()); } // NOUN ND1 = dataStorage.getData("AGC_ND1"); ND2 = dataStorage.getData("AGC_ND2"); if (NFlash) { if (NFC < 1) { screenSegDisps[4].setValue(ND1.ToString() + ND2.ToString()); NFC++; } else if (NFC < 2) { screenSegDisps[4].setValue(""); NFC = 0; } } else { screenSegDisps[4].setValue(ND1.ToString() + ND2.ToString()); } // R1 R1D1 = dataStorage.getData("AGC_R1D1"); R1D2 = dataStorage.getData("AGC_R1D2"); R1D3 = dataStorage.getData("AGC_R1D3"); R1D4 = dataStorage.getData("AGC_R1D4"); R1D5 = dataStorage.getData("AGC_R1D5"); string sign = dataStorage.getData("AGC_R1S"); SegDisp.SignState signState = SegDisp.SignState.AUTO; if (sign == "NEG") { signState = SegDisp.SignState.MINUS; } int.TryParse(dataStorage.getData("AGC_R1P"), out int p); screenSegDisps[0].setValue(R1D1.ToString() + R1D2.ToString() + R1D3.ToString() + R1D4.ToString() + R1D5.ToString(), p, signState); // R2 R2D1 = dataStorage.getData("AGC_R2D1"); R2D2 = dataStorage.getData("AGC_R2D2"); R2D3 = dataStorage.getData("AGC_R2D3"); R2D4 = dataStorage.getData("AGC_R2D4"); R2D5 = dataStorage.getData("AGC_R2D5"); sign = dataStorage.getData("AGC_R2S"); signState = SegDisp.SignState.AUTO; if (sign == "NEG") { signState = SegDisp.SignState.MINUS; } int.TryParse(dataStorage.getData("AGC_R2P"), out p); screenSegDisps[1].setValue(R2D1.ToString() + R2D2.ToString() + R2D3.ToString() + R2D4.ToString() + R2D5.ToString(), p, signState); // R3 R3D1 = dataStorage.getData("AGC_R3D1"); R3D2 = dataStorage.getData("AGC_R3D2"); R3D3 = dataStorage.getData("AGC_R3D3"); R3D4 = dataStorage.getData("AGC_R3D4"); R3D5 = dataStorage.getData("AGC_R3D5"); sign = dataStorage.getData("AGC_R3S"); signState = SegDisp.SignState.AUTO; if (sign == "NEG") { signState = SegDisp.SignState.MINUS; } int.TryParse(dataStorage.getData("AGC_R3P"), out p); screenSegDisps[2].setValue(R3D1.ToString() + R3D2.ToString() + R3D3.ToString() + R3D4.ToString() + R3D5.ToString(), p, signState); // INDICATORS screenIndicators[53].setStatus(dataStorage.getData("AGC_KEYREL") == "SET" ? Indicator.status.WHITE : Indicator.status.OFF); screenIndicators[54].setStatus(dataStorage.getData("AGC_OPRERR") == "SET" ? Indicator.status.WHITE : Indicator.status.OFF); }
public Ice.AsyncResult<R2D2.Callback_BaseToBot_setFlapState> begin_setFlapState(R2D2.FlapState state, _System.Collections.Generic.Dictionary<string, string> ctx__) { return begin_setFlapState(state, ctx__, true, null, null); }
public void playSound(R2D2.Sound snd) { playSound(snd, Ice.ObjectImpl.defaultCurrent); }
public Ice.AsyncResult begin_setFlapState(R2D2.FlapState state, Ice.AsyncCallback cb__, object cookie__) { return begin_setFlapState(state, null, false, cb__, cookie__); }
public void setFlapState(R2D2.FlapState state) { setFlapState(state, Ice.ObjectImpl.defaultCurrent); }
public Ice.AsyncResult begin_setFlapState(R2D2.FlapState state, _System.Collections.Generic.Dictionary<string, string> ctx__, Ice.AsyncCallback cb__, object cookie__) { return begin_setFlapState(state, ctx__, true, cb__, cookie__); }
public static void write(IceInternal.BasicStream os__, R2D2.Obstacle[] v__) { if(v__ == null) { os__.writeSize(0); } else { os__.writeSize(v__.Length); for(int ix__ = 0; ix__ < v__.Length; ++ix__) { v__[ix__].write__(os__); } } }
private Ice.AsyncResult<R2D2.Callback_BaseToBot_setFlapState> begin_setFlapState(R2D2.FlapState state, _System.Collections.Generic.Dictionary<string, string> ctx__, bool explicitContext__, Ice.AsyncCallback cb__, object cookie__) { IceInternal.OnewayOutgoingAsync<R2D2.Callback_BaseToBot_setFlapState> result__ = new IceInternal.OnewayOutgoingAsync<R2D2.Callback_BaseToBot_setFlapState>(this, __setFlapState_name, setFlapState_completed__, cookie__); if(cb__ != null) { result__.whenCompletedWithAsyncCallback(cb__); } try { result__.prepare__(__setFlapState_name, Ice.OperationMode.Normal, ctx__, explicitContext__); IceInternal.BasicStream os__ = result__.startWriteParams__(Ice.FormatType.DefaultFormat); os__.writeEnum((int)state, 1); result__.endWriteParams__(); result__.send__(true); } catch(Ice.LocalException ex__) { result__.exceptionAsync__(ex__); } return result__; }
public void updateBotPosition(R2D2.BotPosition enc, R2D2.BotPosition imu, _System.Collections.Generic.Dictionary<string, string> context__) { updateBotPosition(enc, imu, context__, true); }
private void setFlapState_completed__(R2D2.Callback_BaseToBot_setFlapState cb__) { if(cb__ != null) { cb__(); } }
private void stopAndGo_completed__(R2D2.Callback_BotToBase_stopAndGo cb__) { if(cb__ != null) { cb__(); } }
private void shutdown_completed__(R2D2.Callback_BaseToBot_shutdown cb__) { if(cb__ != null) { cb__(); } }
public Ice.AsyncResult<R2D2.Callback_BotToBase_updateBotPosition> begin_updateBotPosition(R2D2.BotPosition enc, R2D2.BotPosition imu, _System.Collections.Generic.Dictionary<string, string> ctx__) { return begin_updateBotPosition(enc, imu, ctx__, true, null, null); }
public void setFlapState(R2D2.FlapState state, _System.Collections.Generic.Dictionary<string, string> context__, Ice.Instrumentation.InvocationObserver observer__) { IceInternal.Outgoing og__ = handler__.getOutgoing("setFlapState", Ice.OperationMode.Normal, context__, observer__); try { try { IceInternal.BasicStream os__ = og__.startWriteParams(Ice.FormatType.DefaultFormat); os__.writeEnum((int)state, 1); og__.endWriteParams(); } catch(Ice.LocalException ex__) { og__.abort(ex__); } bool ok__ = og__.invoke(); if(og__.hasResponse()) { try { if(!ok__) { try { og__.throwUserException(); } catch(Ice.UserException ex__) { throw new Ice.UnknownUserException(ex__.ice_name(), ex__); } } og__.readEmptyParams(); } catch(Ice.LocalException ex__) { throw new IceInternal.LocalExceptionWrapper(ex__, false); } } } finally { handler__.reclaimOutgoing(og__); } }
public Ice.AsyncResult begin_updateBotPosition(R2D2.BotPosition enc, R2D2.BotPosition imu, _System.Collections.Generic.Dictionary<string, string> ctx__, Ice.AsyncCallback cb__, object cookie__) { return begin_updateBotPosition(enc, imu, ctx__, true, cb__, cookie__); }
public void setFlapState(R2D2.FlapState state, _System.Collections.Generic.Dictionary<string, string> context__, Ice.Instrumentation.InvocationObserver observer__) { Ice.Current current__ = new Ice.Current(); initCurrent__(ref current__, "setFlapState", Ice.OperationMode.Normal, context__); IceInternal.Direct.RunDelegate run__ = delegate(Ice.Object obj__) { BaseToBot servant__ = null; try { servant__ = (BaseToBot)obj__; } catch(_System.InvalidCastException) { throw new Ice.OperationNotExistException(current__.id, current__.facet, current__.operation); } servant__.setFlapState(state, current__); return Ice.DispatchStatus.DispatchOK; }; IceInternal.Direct direct__ = null; try { direct__ = new IceInternal.Direct(current__, run__); try { Ice.DispatchStatus status__ = direct__.getServant().collocDispatch__(direct__); _System.Diagnostics.Debug.Assert(status__ == Ice.DispatchStatus.DispatchOK); } finally { direct__.destroy(); } } catch(Ice.SystemException) { throw; } catch(_System.Exception ex__) { IceInternal.LocalExceptionWrapper.throwWrapper(ex__); } }
private void updateBotPosition_completed__(R2D2.Callback_BotToBase_updateBotPosition cb__) { if(cb__ != null) { cb__(); } }
public void updateBotPosition(R2D2.BotPosition enc, R2D2.BotPosition imu) { updateBotPosition(enc, imu, Ice.ObjectImpl.defaultCurrent); }