コード例 #1
0
        public override object Clone()
        {
            var result = new StartEvent();

            FeedCatchEvent(result);
            return(result);
        }
コード例 #2
0
        protected internal override BaseElement ConvertXMLToElement(XMLStreamReader xtr, BpmnModel model)
        {
            string     formKey    = xtr.GetAttributeValue(BpmnXMLConstants.ACTIVITI_EXTENSIONS_NAMESPACE, BpmnXMLConstants.ATTRIBUTE_FORM_FORMKEY);
            StartEvent startEvent = null;

            if (!string.IsNullOrWhiteSpace(formKey) && model.StartEventFormTypes != null && model.StartEventFormTypes.Contains(formKey))
            {
                startEvent = new AlfrescoStartEvent();
            }
            if (startEvent == null)
            {
                startEvent = new StartEvent();
            }
            BpmnXMLUtil.AddXMLLocation(startEvent, xtr);
            startEvent.Initiator = xtr.GetAttributeValue(BpmnXMLConstants.ACTIVITI_EXTENSIONS_NAMESPACE, BpmnXMLConstants.ATTRIBUTE_EVENT_START_INITIATOR);
            bool   interrupting          = true;
            string interruptingAttribute = xtr.GetAttributeValue(BpmnXMLConstants.ATTRIBUTE_EVENT_START_INTERRUPTING);

            if (BpmnXMLConstants.ATTRIBUTE_VALUE_FALSE.Equals(interruptingAttribute, StringComparison.OrdinalIgnoreCase))
            {
                interrupting = false;
            }
            startEvent.Interrupting = interrupting;
            startEvent.FormKey      = formKey;

            ParseChildElements(XMLElementName, startEvent, model, xtr);

            return(startEvent);
        }
コード例 #3
0
        public override void ProcessRunningDirectiveResult(DirectiveData data, CommunicationEventArgs comEventArgs)
        {
            var ret = data as RockerDirectiveData;

            if (CurrentStatus == DeviceStatusEnum.Startting)
            {
                //从tryStart变为running(真的开始)
                if (ret?.Speed > 0)
                {
                    CurrentStatus             = DeviceStatusEnum.Running;
                    comEventArgs.DeviceStatus = DeviceStatusEnum.Running;

                    StartEvent.TrySetResult(new DeviceIOResult(true));

                    OnCommunicationChange(comEventArgs);
                    StartRunningLoop();
                }
                else
                {
                    comEventArgs.DeviceStatus = CurrentStatus;
                    StartRunningLoop();
                }
            }
            else if (CurrentStatus == DeviceStatusEnum.Running)
            {
                comEventArgs.DeviceStatus = DeviceStatusEnum.Running;
                StartRunningLoop();
            }
            else
            {
                comEventArgs.DeviceStatus = DeviceStatusEnum.Error;
            }
        }
コード例 #4
0
ファイル: StateMachine.cs プロジェクト: shoematt/StormState
        /// <summary>
        ///     Starts this instance.
        /// </summary>
        public void Start( )
        {
            try
            {
                if (_isStarted)
                {
                    return;
                }

                _isStarted = true;

                if (_stateMap.Transitions.Count > 0)
                {
                    ActiveStates = _stateMap.GetInitialStates( );
                }

                if (StartEvent != null)
                {
                    StartEvent.Execute(StateContainer, _stateMap);
                }

                foreach (IState state in ActiveStates)
                {
                    if (state.Enter != null)
                    {
                        state.Enter.CallOnEach(x => x.Execute(StateContainer, _stateMap));
                    }
                }
            }
            catch (Exception ex)
            {
                throw new StateMachineException(ex.Message);
            }
        }
コード例 #5
0
    private void Awake()
    {
        if (engine == null)
        {
            engine = new Engine();
            initEngine(engine);
        }

        if (seeEvent == null)
        {
            seeEvent = new GameEvent();
            seeEvent.AddListener(obstacle => {
                engine.SetValue("obstacle", obstacle)
                .Execute(onSee);
            });
        }

        if (onEvent == null)
        {
            onEvent = new GameEvent();
            onEvent.AddListener(obstacle => {
                engine.SetValue("obstacle", obstacle)
                .Execute(onNear);
            });
        }


        if (startEvent == null)
        {
            startEvent = new StartEvent();
            startEvent.AddListener(() => { engine.Execute(onStart); });
        }
    }
コード例 #6
0
        static StartEvent CreateStartEvent(XElement xElement)
        {
            var startEvent = new StartEvent();

            startEvent.Id = GetProcessId(xElement);
            return(startEvent);
        }
コード例 #7
0
ファイル: DragButt_t.cs プロジェクト: tommyboys0107/2018gcgj
 void Start()
 {
     if (ToCam == null)
     {
         ToCam = Camera.main;
     }
     onPress += (go, state) => {
         Open = state;
         if (state)
         {
             StartV2 = GetV2(Input.mousePosition);
             StartEvent.Invoke();
         }
         else
         {
             if (!Out)
             {
                 EndEvent.Invoke();
             }
             else
             {
                 Father.onPress(Father.gameObject, false);
             }
             Out = false;
         }
     };
 }
コード例 #8
0
ファイル: CustomTimer.cs プロジェクト: ninasus/Lottery
        public CustomTimer(System.Threading.TimerCallback callback, object state, int dueTime, int period, DisposeEvent _eventDispose, StartEvent _eventStart)
        {
            onDispose += _eventDispose;
            onStart += _eventStart;

            timer = new System.Threading.Timer(callback, state, dueTime, period);
        }
コード例 #9
0
        static StartEvent CreateStartEvent(XElement xElement)
        {
            var startEvent = new StartEvent();

            FillCommonProcessElementAttributes(startEvent, xElement);
            return(startEvent);
        }
コード例 #10
0
        public MidiEvent Read(MidiReader reader, ReadingSettings settings, byte currentStatusByte)
        {
            SystemRealTimeEvent systemRealTimeEvent = null;

            switch (currentStatusByte)
            {
            case EventStatusBytes.SystemRealTime.ActiveSensing:
                systemRealTimeEvent = new ActiveSensingEvent();
                break;

            case EventStatusBytes.SystemRealTime.Continue:
                systemRealTimeEvent = new ContinueEvent();
                break;

            case EventStatusBytes.SystemRealTime.Reset:
                systemRealTimeEvent = new ResetEvent();
                break;

            case EventStatusBytes.SystemRealTime.Start:
                systemRealTimeEvent = new StartEvent();
                break;

            case EventStatusBytes.SystemRealTime.Stop:
                systemRealTimeEvent = new StopEvent();
                break;

            case EventStatusBytes.SystemRealTime.TimingClock:
                systemRealTimeEvent = new TimingClockEvent();
                break;
            }

            systemRealTimeEvent.Read(reader, settings, MidiEvent.UnknownContentSize);
            return(systemRealTimeEvent);
        }
コード例 #11
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void createModel()
        public virtual void createModel()
        {
            testBpmnModelInstance = Bpmn.createEmptyModel();
            Definitions definitions = testBpmnModelInstance.newInstance(typeof(Definitions));

            testBpmnModelInstance.Definitions = definitions;

            message    = testBpmnModelInstance.newInstance(typeof(Message));
            message.Id = "message-id";
            definitions.RootElements.Add(message);

            Process process = testBpmnModelInstance.newInstance(typeof(Process));

            process.Id = "process-id";
            definitions.RootElements.Add(process);

            startEvent    = testBpmnModelInstance.newInstance(typeof(StartEvent));
            startEvent.Id = "start-event-id";
            process.FlowElements.Add(startEvent);

            messageEventDefinition         = testBpmnModelInstance.newInstance(typeof(MessageEventDefinition));
            messageEventDefinition.Id      = "msg-def-id";
            messageEventDefinition.Message = message;
            startEvent.EventDefinitions.Add(messageEventDefinition);

            startEvent.EventDefinitionRefs.Add(messageEventDefinition);
        }
コード例 #12
0
 /// <summary>
 /// 准备
 /// </summary>
 /// <param name="clientPeer"></param>
 private void ready(ClientPeer clientPeer)
 {
     SingleExcute.Instance.Excute(() =>
     {
         if (!accountCache.IsOnline(clientPeer))
         {
             return;
         }
         int accid = accountCache.GetId(clientPeer);
         if (!userModelCache.IsExistUserModel(accid))
         {
             return;
         }
         int uid             = userModelCache.GetModelByAccid(accid).Id;
         RoomModel roomModel = roomCache.GetRoomModelByUid(uid);
         roomModel.Ready(uid);
         roomModel.Brocast(uid, clientPeer, OpCode.MATCH, MatchCode.READY_BRO);
         //判断是否所有玩家都已经准备
         if (roomModel.IsAllReady())
         {
             //向客户端发送开始游戏的响应
             roomModel.Brocast(null, null, OpCode.MATCH, MatchCode.START_BRO);
             StartEvent.Invoke(roomModel.GetAllReadyUserIdInRoom());
         }
     });
 }
コード例 #13
0
    void onStart(StartEvent e)
    {
        Event <PlaySoundEvent> .Broadcast(new PlaySoundEvent(m_startClip));

        m_startMessage.SetActive(true);
        DOVirtual.DelayedCall(m_startMessageTime, () => m_startMessage.SetActive(false));
    }
コード例 #14
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test @BpmnModelResource public void shouldFindReferenceWithNamespace()
        public virtual void shouldFindReferenceWithNamespace()
        {
            MessageEventDefinition messageEventDefinition = bpmnModelInstance.getModelElementById("message-event-definition");
            Message message = bpmnModelInstance.getModelElementById("message-id");

            assertThat(messageEventDefinition.Message).NotNull;
            assertThat(messageEventDefinition.Message).isEqualTo(message);
            message.Id = "changed-message";
            assertThat(messageEventDefinition.Message).NotNull;
            assertThat(messageEventDefinition.Message).isEqualTo(message);
            message.setAttributeValue("id", "again-changed-message", true);
            assertThat(messageEventDefinition.Message).NotNull;
            assertThat(messageEventDefinition.Message).isEqualTo(message);

            StartEvent startEvent = bpmnModelInstance.getModelElementById("start-event");
            ICollection <EventDefinition> eventDefinitionRefs = startEvent.EventDefinitionRefs;

            assertThat(eventDefinitionRefs).NotEmpty;
            assertThat(eventDefinitionRefs).contains(messageEventDefinition);
            messageEventDefinition.Id = "changed-message-event";
            assertThat(eventDefinitionRefs).NotEmpty;
            assertThat(eventDefinitionRefs).contains(messageEventDefinition);
            messageEventDefinition.setAttributeValue("id", "again-changed-message-event", true);
            assertThat(eventDefinitionRefs).NotEmpty;
            assertThat(eventDefinitionRefs).contains(messageEventDefinition);

            message.removeAttribute("id");
            assertThat(messageEventDefinition.Message).Null;
            messageEventDefinition.removeAttribute("id");
            assertThat(eventDefinitionRefs).doesNotContain(messageEventDefinition);
            assertThat(eventDefinitionRefs).Empty;
        }
コード例 #15
0
        protected internal override bool WriteExtensionChildElements(BaseElement element, bool didWriteExtensionStartElement, XMLStreamWriter xtw)
        {
            StartEvent startEvent = (StartEvent)element;

            didWriteExtensionStartElement = WriteFormProperties(startEvent, didWriteExtensionStartElement, xtw);
            return(didWriteExtensionStartElement);
        }
コード例 #16
0
        public override BaseFlowNode Build()
        {
            var result = new StartEvent();

            FeedCatchEvt(result);
            return(result);
        }
コード例 #17
0
 private void Start()
 {
     StartEvent.Invoke();
     if (SolvedPuzzle.value)
     {
         IfSolvedPuzzle.Invoke();
     }
 }
コード例 #18
0
ファイル: MainUI.cs プロジェクト: ChanUkLee/Tetris
    public void Initialize(StartEvent startEvent, RankEvent rankEvent, OptionEvent optionEvent)
    {
        Initialize();

        this._startEvent = startEvent;
        this._rankEvent = rankEvent;
        this._optionEvent = optionEvent;
    }
コード例 #19
0
 public SequenceFlow(JToken process, StartEvent startEvent, EndEvent endEvent, ExpressionContext context)
 {
     _process       = process;
     _startEvent    = startEvent;
     _endEvent      = endEvent;
     _context       = context;
     _currentFlowId = _startEvent.Outgoing;
 }
コード例 #20
0
ファイル: BpmnFactory.cs プロジェクト: windischb/BPMNUtils
        public virtual StartEvent CreateStartEvent()
        {
            var startEvent = new StartEvent();

            //startEvent.Tag = new StartEventActivityBehavior();

            return(startEvent);
        }
コード例 #21
0
        public bool Validate(BPMNTrail trail)
        {
            this.trail = trail;
            StartEvent se = trail.GetFirstStartEvent();

            RunStates(se, graph);
            return(results.TrueForAll(x => x.Equals(true)));
        }
コード例 #22
0
        public virtual StartEventBuilder startEvent(string id)
        {
            StartEvent start     = createChild(typeof(StartEvent), id);
            BpmnShape  bpmnShape = createBpmnShape(start);

            Coordinates = bpmnShape;
            return(start.builder());
        }
コード例 #23
0
 public void Start()
 {
     StartEvent?.Invoke(this.Cosmonauts);
     timer.Interval  = 20;
     timer.AutoReset = true;
     timer.Elapsed  += new System.Timers.ElapsedEventHandler(Tick);
     timer.Start();
 }
コード例 #24
0
ファイル: EventHandler.cs プロジェクト: Gafig/RPG_Project
    private void Update()
    {
        Transform eventTranform = transform.FindChild("Event");

        if (eventTranform != null)
        {
            startEvent = eventTranform.GetChild(0).FindChild("StartEvent").GetComponent <StartEvent>();
        }
    }
コード例 #25
0
        private void StartEvent_event1(object sender, StartEvent e)
        {
            list = e.list;

            Dispatcher.Invoke(() =>
            {
                gMakinaDurumWord.Content = list[0].ToString();
            });
        }
コード例 #26
0
ファイル: StartableLogic.cs プロジェクト: larnin/Pot-au-jeu
 void onStartEvent(StartEvent e)
 {
     m_started = true;
     onLateStart();
     if (enabled)
     {
         onEnable();
     }
 }
コード例 #27
0
    public void StartGame(string nickname)
    {
        _player = nickname;

        if (_resetOnNewGame)
        {
            _score.Value = 0;
        }
        StartEvent?.Invoke();
    }
コード例 #28
0
ファイル: TimeManager.cs プロジェクト: pdxparrot/ssj2019
            public void Continue()
            {
                if (IsRunning)
                {
                    return;
                }
                _isRunning = true;

                StartEvent?.Invoke(this, EventArgs.Empty);
            }
コード例 #29
0
ファイル: Cleaner.cs プロジェクト: Robozou/bpmntrails
        private void FindEvents()
        {
            StartEvent se = trail.GetFirstStartEvent();

            bpmnElements.Add(se.id);
            foreach (List <string> trace in traces)
            {
                trail.GetStartEvent(se.id).outgoing.ForEach(x => FindEvent(x, trace));
            }
        }
コード例 #30
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldAddParentChildElementInCorrectOrder()
        public virtual void shouldAddParentChildElementInCorrectOrder()
        {
            // create empty model
            BpmnModelInstance bpmnModelInstance = Bpmn.createEmptyModel();

            // add definitions to model
            Definitions definitions = bpmnModelInstance.newInstance(typeof(Definitions));

            definitions.TargetNamespace   = "Examples";
            bpmnModelInstance.Definitions = definitions;

            // add process
            Process process = bpmnModelInstance.newInstance(typeof(Process));

            process.Id = "messageEventDefinition";
            definitions.RootElements.Add(process);

            // add start event
            StartEvent startEvent = bpmnModelInstance.newInstance(typeof(StartEvent));

            startEvent.Id = "theStart";
            process.FlowElements.Add(startEvent);

            // create and add message
            Message message = bpmnModelInstance.newInstance(typeof(Message));

            message.Id = "start-message-id";
            definitions.RootElements.Add(message);

            // add message event definition to start event
            MessageEventDefinition startEventMessageEventDefinition = bpmnModelInstance.newInstance(typeof(MessageEventDefinition));

            startEventMessageEventDefinition.Message = message;
            startEvent.EventDefinitions.Add(startEventMessageEventDefinition);

            // add property after message event definition
            Property property = bpmnModelInstance.newInstance(typeof(Property));

            startEvent.Properties.Add(property);

            // finally add an extensions element
            ExtensionElements extensionElements = bpmnModelInstance.newInstance(typeof(ExtensionElements));

            process.ExtensionElements = extensionElements;

            // validate model
            try
            {
                Bpmn.validateModel(bpmnModelInstance);
            }
            catch (ModelValidationException)
            {
                Assert.fail();
            }
        }
コード例 #31
0
        /// <summary>
        /// 启动,完成后引发StartEvent
        /// </summary>
        /// <param name="port">服务端口</param>
        public virtual void Start(int port)
        {
            var task = new Task(async() =>
            {
                string result = await CreateMQTTServer(port);
                Console.Title = $"0.0.0.0:{port}";
                StartEvent?.Invoke(result);
            });

            task.Start();
        }
コード例 #32
0
 private void Update()
 {
     if (!Input.GetKey(KeyCode.Space) || !enableStart)
     {
         return;
     }
     startText.gameObject.SetActive(false);
     enableStart = false;
     StartEvent?.Invoke();
     StartCoroutine(RunStartWait());
 }
コード例 #33
0
 public void EventPublisherPublishes()
 {
     using (var scope = BeginScope())
     {
         var start = new StartEvent();
         var stop = new StopEvent();
         var pub = scope.Resolve<IEventPublisher>();
         pub.Publish(start);
         pub.Publish(stop);
         var handler = scope.Resolve<InfrastructureEventHandler>();
         Assert.Equal(2, handler.Events.Count);
         Assert.Equal(start, handler.Events[0]);
         Assert.Equal(stop, handler.Events[1]);
     }
 }
コード例 #34
0
 public async Task AsyncEventPublisherPublishes()
 {
     using (var scope = BeginScope())
     {
         var start = new StartEvent();
         var stop = new StopEvent();
         var pub = scope.Resolve<IEventPublisher>();
         var handler = scope.Resolve<InfrastructureEventHandler>();
         var asyncHandler = scope.Resolve<InfrastructureAsyncEventHandler>();
         Assert.Equal(0, handler.Events.Count);
         Assert.Equal(0, asyncHandler.Events.Count);
         await pub.PublishAsync(start);
         await pub.PublishAsync(stop);
         
         Assert.Equal(2, handler.Events.Count);
         Assert.Equal(start, handler.Events[0]);
         Assert.Equal(stop, handler.Events[1]);
         Assert.Equal(2, asyncHandler.Events.Count);
         Assert.Equal(start, asyncHandler.Events[0]);
         Assert.Equal(stop, asyncHandler.Events[1]);
     }
 }
コード例 #35
0
 protected virtual void OnStarted(StartEvent msg)
 {
     if (msg.SourceUri!=null) {
     this.SourceUri = msg.SourceUri;
     StartConnection(msg.SourceUri);
       }
       else {
     Stop(StopReason.NoHost);
       }
 }
コード例 #36
0
        private void SetStartState(object sender, EventArgs e)
        {
            // Assume disabled by default
            bool startState = false;
            string sourceAccount = (string)SourceStorageAccount.SelectedItem;
            string destAccount = (string)DestStorageAccount.SelectedItem;
            string sourceBlobFilename = SourceBlobFilename.Text;
            string destBlobFilename = DestBlobFilename.Text;
            string sourceLocalFilename = SourceLocalFilename.Text;
            string destLocalFilename = DestLocalFilename.Text;

            if (SourceTableEndpoint.Checked && DestTableEndpoint.Checked)
            {
                // Endpoint to endpoint backup
                if (IsValidStorageAccount(sourceAccount) && IsValidStorageAccount(destAccount))
                {
                    if (sourceAccount != destAccount)
                    {
                        startState = true;
                        startEvent = delegate()
                        {
                            if (this.ConfirmRestore(destAccount))
                            {
                                backupClient.StartEndpointToEndpointBackup(
                                    settings.GetConnectionString(sourceAccount),
                                    settings.GetConnectionString(destAccount));
                            }
                        };
                    }
                }
            }
            else if (SourceTableEndpoint.Checked && DestBlobFile.Checked)
            {
                // Endpoint to blob backup
                if (IsValidStorageAccount(sourceAccount) && IsValidBlob(destBlobFilename) &&
                    IsValidStorageAccount(destAccount))
                {
                    startState = true;
                    startEvent = delegate()
                    {
                        backupClient.StartEndpointToBlobBackup(
                            settings.GetConnectionString(sourceAccount),
                            settings.GetConnectionString(destAccount),
                            GetContainerName(destBlobFilename),
                            GetBlobName(destBlobFilename));
                    };
                }
            }
            else if (SourceTableEndpoint.Checked && DestLocalFile.Checked)
            {
                // Endpoint to file backup
                if (IsValidStorageAccount(sourceAccount) && IsValidBackupPath(destLocalFilename))
                {
                    startState = true;
                    startEvent = delegate()
                    {
                        backupClient.StartEndpointToFileBackup(
                            settings.GetConnectionString(sourceAccount),
                            destLocalFilename);
                    };
                }
            }
            else if (SourceBlobFile.Checked && DestTableEndpoint.Checked)
            {
                // Blob to endpoint backup
                if (IsValidStorageAccount(sourceAccount) && IsValidBlob(sourceBlobFilename) && IsValidStorageAccount(destAccount))
                {
                    startState = true;
                    startEvent = delegate()
                    {
                        if (this.ConfirmRestore(destAccount))
                        {
                            backupClient.StartBlobToEndpointBackup(
                                settings.GetConnectionString(sourceAccount),
                                settings.GetConnectionString(destAccount),
                                GetContainerName(sourceBlobFilename),
                                GetBlobName(sourceBlobFilename));
                        }
                    };
                }
            }
            else if (SourceBlobFile.Checked && DestBlobFile.Checked)
            {
                // Blob to blob backup
                if (IsValidStorageAccount(sourceAccount) && IsValidBlob(sourceBlobFilename) &&
                    IsValidStorageAccount(destAccount) && IsValidBlob(destBlobFilename))
                {
                    string sourceContainer = GetContainerName(sourceBlobFilename);
                    string destContainer = GetContainerName(destBlobFilename);
                    string sourceFilename = GetBlobName(sourceBlobFilename);
                    string destFilename = GetBlobName(destBlobFilename);

                    if ((sourceContainer != destContainer) && (sourceFilename != destFilename))
                    {
                        startState = true;
                        startEvent = delegate()
                        {
                            backupClient.StartBlobToBlobBackup(
                                settings.GetConnectionString(sourceAccount),
                                settings.GetConnectionString(destAccount),
                                sourceContainer,
                                sourceFilename,
                                destContainer,
                                destFilename);
                        };
                    }
                }
            }
            else if (SourceBlobFile.Checked && DestLocalFile.Checked)
            {
                // Blob to file backup
                if (IsValidStorageAccount(sourceAccount) && IsValidBlob(sourceBlobFilename) &&
                    IsValidBackupPath(destLocalFilename))
                {
                    startState = true;
                    startEvent = delegate()
                    {
                        backupClient.StartBlobToFileBackup(
                            settings.GetConnectionString(sourceAccount),
                            GetContainerName(sourceBlobFilename),
                            GetBlobName(sourceBlobFilename),
                            destLocalFilename);
                    };
                }
            }
            else if (SourceLocalFile.Checked && DestTableEndpoint.Checked)
            {
                // File to endpoint backup
                if (IsValidBackupFile(sourceLocalFilename) && IsValidStorageAccount(destAccount))
                {
                    startState = true;
                    startEvent = delegate()
                    {
                        if (this.ConfirmRestore(destAccount))
                        {
                            backupClient.StartFileToEndpointBackup(
                                sourceLocalFilename,
                                settings.GetConnectionString(destAccount));
                        }
                    };
                }
            }
            else if (SourceLocalFile.Checked && DestBlobFile.Checked)
            {
                // File to blob backup
                if (IsValidBackupFile(sourceLocalFilename) && IsValidBlob(destBlobFilename) &&
                    IsValidStorageAccount(destAccount))
                {
                    startState = true;
                    startEvent = delegate()
                    {
                        backupClient.StartFileToBlobBackup(
                            sourceLocalFilename,
                            settings.GetConnectionString((string)destAccount),
                            GetContainerName(destBlobFilename),
                            GetBlobName(destBlobFilename));
                    };
                }
            }
            else if (SourceLocalFile.Checked && DestLocalFile.Checked)
            {
                // File to file backup
                if (IsValidBackupFile(sourceLocalFilename) && IsValidBackupFile(destLocalFilename))
                {
                    if (sourceLocalFilename != destLocalFilename)
                    {
                        startState = true;
                        startEvent = delegate()
                        {
                            backupClient.StartFileToFileBackup(
                                sourceLocalFilename,
                                destLocalFilename);
                        };
                    }
                }
            }

            StartButton.Enabled = startState;

            if (StartButton.Enabled)
            {
                StartButton.Focus();
            }
        }