コード例 #1
0
ファイル: ReadOnlyDeviceState.cs プロジェクト: Mavtak/roomie
        public ReadOnlyDeviceState NewWithLocation(ILocation location)
        {
            var result = CopyFrom(this);

            result.Location = location.Copy();

            return(result);
        }
コード例 #2
0
        private void btnEditLocation_Click(object sender, EventArgs e)
        {
            if (this.ddlLocations.SelectedIndex < 0 || !(this.ddlLocations.SelectedItem is ILocation))
            {
                return;
            }
            ILocation        selectedItem     = (ILocation)this.ddlLocations.SelectedItem;
            LocationSettings locationSettings = new LocationSettings();

            locationSettings.SelectedLocation = new Location(selectedItem);
            if (locationSettings.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            selectedItem.Copy((ILocation)locationSettings.SelectedLocation);
            this.ResetLocationList();
        }
コード例 #3
0
ファイル: ReadOnlyDeviceState.cs プロジェクト: Mavtak/roomie
        public ReadOnlyDeviceState NewWithLocation(ILocation location)
        {
            var result = CopyFrom(this);
            result.Location = location.Copy();

            return result;
        }