Fixes #202 This PR fixes code style for the project files. The Problem Different files in the project use different code style. That is not consistent and leads to harder maintenance of the project. Description of the changes: Have investigated and determined the most used code style across the given codebase Have configured IDE and applied code style to all project files. Have crafted clang-formatter config. see https://clang.llvm.org/docs/ClangFormat.html https://clang.llvm.org/docs/ClangFormatStyleOptions.html Some cases were fixed manually How changes were validated: manual/ad-hoc testing, automated testing All tests pass as before because these are only code style changes. Additional Please review, and let me know if I have any mistake in the code style. In case of any mistake, I will change the configuration and re-apply it to the project.
41 lines
1.4 KiB
C++
41 lines
1.4 KiB
C++
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// Licensed under the MIT License.
|
|
|
|
//
|
|
// HistoryList.xaml.h
|
|
// Declaration of the HistoryList class
|
|
//
|
|
|
|
#pragma once
|
|
|
|
#include "Views/HistoryList.g.h"
|
|
#include "Converters/ItemSizeToVisibilityConverter.h"
|
|
#include "Converters/VisibilityNegationConverter.h"
|
|
#include "CalcViewModel/HistoryViewModel.h"
|
|
|
|
namespace CalculatorApp
|
|
{
|
|
[Windows::Foundation::Metadata::WebHostHidden] public ref class HistoryList sealed
|
|
{
|
|
public:
|
|
HistoryList();
|
|
property CalculatorApp::ViewModel::HistoryViewModel^ Model
|
|
{
|
|
CalculatorApp::ViewModel::HistoryViewModel^ get() {
|
|
return static_cast<CalculatorApp::ViewModel::HistoryViewModel^>(this->DataContext);
|
|
}
|
|
}
|
|
|
|
void ScrollToBottom();
|
|
DEPENDENCY_PROPERTY_OWNER(HistoryList);
|
|
DEPENDENCY_PROPERTY(Windows::UI::Xaml::GridLength, RowHeight);
|
|
|
|
private:
|
|
Windows::Foundation::Rect m_visibleBounds;
|
|
Windows::Foundation::Rect m_coreBounds;
|
|
void ListView_ItemClick(_In_ Platform::Object ^ sender, _In_ Windows::UI::Xaml::Controls::ItemClickEventArgs ^ e);
|
|
void OnDeleteMenuItemClicked(_In_ Platform::Object ^ sender, _In_ Windows::UI::Xaml::RoutedEventArgs ^ e);
|
|
void OnDeleteSwipeInvoked(_In_ Microsoft::UI::Xaml::Controls::SwipeItem ^ sender, _In_ Microsoft::UI::Xaml::Controls::SwipeItemInvokedEventArgs ^ e);
|
|
};
|
|
}
|